#6 Merged
Repository
mhart mhart
Branch
fix-validation-errors
Repository
Ludia Ludia
Branch
default

Ensure ValidationException error messages are output correctly

Author
  1. Michael Hart avatarMichael Hart
Reviewers
Description

Prior to this change, any ValidationError would look like this (in both the logger and the 400 HTTP response) - which doesn't seem to bear any resemblance to the actual error thrown:

2013-04-06 19:25:55,793 ERROR [Request logger][Dummy-3] request_id=2 action=PutItem exception=ValidationException body=('[InvalidList(), Invalid("required keys set([u\'Item\', u\'ReturnValues\', u\'TableName\', u\'Expected\', \'request_id\']) not provided",), Invalid("required keys set([u\'Item\', u\'ReturnValues\', u\'TableName\', u\'Expected\', \'request_id\']) not provided",), Invalid("required keys set([u\'Item\', u\'ReturnValues\', u\'TableName\', u\'Expected\', \'request_id\']) not provided",)]',)

Now they make a lot more sense (although, to be honest, still a bit ugly):

2013-04-06 19:27:33,636 ERROR [Request logger][Dummy-3] request_id=10 action=PutItem exception=ValidationException body=("String fields can not be empty for dictionary value @ data[u'Item'][u'createCategory'][u'S']",)

Comments (0)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.