nesting in error response
This commit is contained in:
parent
f60b9ecd55
commit
5972453386
@ -45,11 +45,19 @@ namespace EvoCalculator.Core.Controllers.V1
|
||||
|
||||
if (errors != null && errors.Count > 0)
|
||||
{
|
||||
return StatusCode(500, JsonConvert.SerializeObject(errors,
|
||||
new JsonSerializerSettings {Formatting = Formatting.Indented}));
|
||||
return StatusCode(500, JsonConvert.SerializeObject(
|
||||
new
|
||||
{
|
||||
errors
|
||||
},
|
||||
new JsonSerializerSettings
|
||||
{
|
||||
Formatting = Formatting.Indented
|
||||
}));
|
||||
}
|
||||
|
||||
return Ok(JsonConvert.SerializeObject(res,
|
||||
return Ok(JsonConvert.SerializeObject(
|
||||
res,
|
||||
new JsonSerializerSettings
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user