Auto-encode dictionaries to JSON in the error handler.
Merge branch 'feature/errorjson'
Do auto-encoding of both dicts and lists in error handler.
Merge branch 'feature/errorjson'