Last active
October 31, 2018 22:00
-
-
Save pedrovasconcellos/fcb37df04e93389c76581c70717b0b71 to your computer and use it in GitHub Desktop.
Error details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using System.Collections.Generic; | |
public class ErrorDetails | |
{ | |
public ErrorDetails(Dictionary<string, string[]> errorsDictionary, string instance) | |
{ | |
this.Errors = errorsDictionary; | |
this.Type = "Business Rules"; | |
this.Title = "One or more validation errors occurred."; | |
this.Status = 422; | |
this.Detail = "Please refer to the errors property for additional details."; | |
this.Instance = instance; | |
} | |
public ErrorDetails(Dictionary<string, string[]> errorsDictionary, string instance, short status) | |
{ | |
this.Errors = errorsDictionary; | |
this.Type = "Business Rules"; | |
this.Title = "One or more validation errors occurred."; | |
this.Status = status; | |
this.Detail = "Please refer to the errors property for additional details."; | |
this.Instance = instance; | |
} | |
public Dictionary<string, string[]> Errors { get; set; } | |
public string Type { get; set; } | |
public string Title { get; set; } | |
public short Status { get; set; } | |
public string Detail { get; set; } | |
public string Instance { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment