public HttpResponseMessage UnprocessableEntity(HttpErrorResponse errorResponse) { return(new HttpResponseMessage((HttpStatusCode)422) { Content = new StringContent(JsonConvert.SerializeObject(errorResponse), Encoding.UTF8, ContentApplicationType.ApplicationJSON) }); }
public HttpResponseMessage Conflict(HttpErrorResponse errorResponse) { return(new HttpResponseMessage(HttpStatusCode.Conflict) { Content = new StringContent(JsonConvert.SerializeObject(errorResponse), Encoding.UTF8, ContentApplicationType.ApplicationJSON) }); }