-
-
Notifications
You must be signed in to change notification settings - Fork 607
Open
Labels
Dialects v2Issues which will likely be addressed as part of reworked dialect supportIssues which will likely be addressed as part of reworked dialect supportEnhancementSome new desired functionalitySome new desired functionalityError ReportingIssues related to clearer or more robust validation error reportingIssues related to clearer or more robust validation error reporting
Description
I'm not sure if this is a real issue or not, but something that bothered me is that validation errors use "%r" as a format string which causes your json to look pretty ugly in the error message with all strings looking like {u'key':u'value'} instead of {"key":"value"}.
In my json API when I return an error it might be confusing for the developer using my API that there's suddenly and u in a string because that's not valid JSON.
Of course I could build a custom error message from all the errors I get, but that would be a bit tedious. Would it be something to consider to print the schemas and validated data as json strings instead of python dicts in error messages?
Perhaps it's something worth discussing.
rkrzr
Metadata
Metadata
Assignees
Labels
Dialects v2Issues which will likely be addressed as part of reworked dialect supportIssues which will likely be addressed as part of reworked dialect supportEnhancementSome new desired functionalitySome new desired functionalityError ReportingIssues related to clearer or more robust validation error reportingIssues related to clearer or more robust validation error reporting