ServiceStack/ServiceStack — Issue #105: Exception info for Validation
Author: reiroldan
Created: 2012-02-23 11:41:27+00:00
State: open

The validation wiki page https://github.com/ServiceStack/ServiceStack/wiki/Validation reads that when validations are run on a dto the exception returned would be something like:

{
"ErrorCode": "GreaterThan",
"Message": "'Age' must be greater than '0'.",
"Errors": [
{
"ErrorCode": "GreaterThan",
"FieldName": "Age",
"Message": "'Age' must be greater than '0'."
},
{
"ErrorCode": "NotEmpty",
"FieldName": "Company",
"Message": "'Company' should not be empty."
}
]
}

This doesn't appear to be the response being returned. Using a get request, the response is empty with a status error of 400.

Performing a send with a JsonServiceClient the exception type is a WebServiceException and the only parts filled in is Message and an empty (not null) ResponseDto. But the errors are not part of this exception type.

Greetings