Responses like Json deserialize error: invalid type: floating point '123.123', expected i32 at line 1 column 139 as plain text are even more difficult to understand. As a quickfix there should be a global error handler that wraps unexpected errors into json
Requirements
Is your proposal related to a problem?
I'm using a client to consume the API, and it's difficult to understand what data is incorrect
For example:
Create Community:
{"error":"invalid_url"}
{ "errors" { "Banner" [ "The Bannner field should be a valid uri"] }}
(json)Create Community:
Json deserialize error: invalid type: floating point '123.123', expected i32 at line 1 column 139
(Not even Json){ "errors" { "DiscussionLanguages" [ "The DiscussionLanguages field should be a valid int"] }}
These are just 2 examples of course, I would propose to respond with better details of everything could go wrong
Describe the solution you'd like.
Have a look at:
Describe alternatives you've considered.
Responses like
Json deserialize error: invalid type: floating point '123.123', expected i32 at line 1 column 139
as plain text are even more difficult to understand. As a quickfix there should be a global error handler that wraps unexpected errors into json