Closed mcbouslog closed 7 years ago
Errors should be coming back as simple objects in the response body. http://jsonapi.org/format/#errors I think the Panoptes JavaScript client is swallowing those responses, instead of passing them to the client app.
Related discussion in #27 too.
@eatyourgreens - is the error.response.body.errors
array from the superagent error object (screen shot below) what you mention above or are you referring to what the jsonapi docs note - "Error objects MUST be returned as an array keyed by errors in the top level of a JSON API document?" I'm not sure I entire understand what that is stating.
A. Is there an API request I could do to test what multiple errors would look like?
B. Are there other common errors and their related requests I can try?
C. The jsonapi docs list things the error object "MAY" have. Do the attributes of error.response
suffice? They're not labeled exactly the same, but they appear to provide similar if not the same information.
I'm thinking we replace this issue with separate, more specific issues, as we continue to make improvements to this client and the panoptes-javascript-client.
PLEASE EDIT THIS INITIAL COMMENT AS YOU SEE FIT
Issue: to handle api errors from json-api-client better.
Before SGL (1st PRs):
panoptes-client
PR #62If Possible Before SGL (2nd PRs):
After SGL (other PRs):