Skip to content
This repository was archived by the owner on Jan 3, 2021. It is now read-only.
This repository was archived by the owner on Jan 3, 2021. It is now read-only.

Incorrect Custom Error Example #1

Open
@jaredcnance

Description

@jaredcnance

https://json-api-dotnet.github.io/#/custom-errors

public class CustomJsonApiException : Error 
{
  public CustomJsonApiException(int status, string title)
  : base(status, title)
  { }

  private const string HELP_DOCS_URI = "https://example.com/errors/";
  public ErrorLink Links => HELP_DOCS_URI + Status;
}

// ...
throw new CustomJsonApiException(401, "You're not allowed to do that.");
        

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions