You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/10/22 21:19:11 UTC
[GitHub] williaster opened a new pull request #6163: [superset-client] use
getClientErrorObject for client error handling
williaster opened a new pull request #6163: [superset-client] use getClientErrorObject for client error handling
URL: https://github.com/apache/incubator-superset/pull/6163
This PR fixes #6152 and is a more generic fix for #6158 for handling fetch-based errors. It adds a method `getClientErrorObject` which takes a fetch `Response` as input, reads it as either `json` or `text`, and returns a `Promise` that resolves to an object with all keys from the `Response` and an `error` key which can be used for display in the UI.
Note this is more complex than previous `ajax` errors because we must read the response explicitly, and because of the mixture of response types we have no idea if it's text or json.
Added unit tests and tested locally.
@mistercrunch @graceguo-supercat @kristw @michellethomas
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org