Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Last active April 20, 2021 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitvijay/dc32271b90baa1c541ef2d2b34ec2b32 to your computer and use it in GitHub Desktop.
Save ankitvijay/dc32271b90baa1c541ef2d2b34ec2b32 to your computer and use it in GitHub Desktop.
Error Response Object - Consistent Error Handling
public class ErrorResponse
{
public HttpStatusCode StatusCode { get; set; }
public string Title { get; set; }
public string Exception { get; set; }
public List<ErrorEntry> Entries { get; set; }
}
public class ErrorEntry
{
public string Code { get; set; }
public string Title { get; set; }
public string Source { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment