ktmud commented on code in PR #19983:
URL: https://github.com/apache/superset/pull/19983#discussion_r908734143
##########
superset-frontend/src/utils/urlUtils.ts:
##########
@@ -134,14 +133,7 @@ function getPermalink(endpoint: string, jsonPayload:
JsonObject) {
return SupersetClient.post({
endpoint,
jsonPayload,
- })
- .then(result => result.json.url as string)
- .catch(response =>
- // @ts-ignore
- getClientErrorObject(response).then(({ error, statusText }) =>
- Promise.reject(error || statusText),
- ),
- );
Review Comment:
Errors should be handled downstream---when it's about to be rendered. These
adhoc handling of API errors makes it more difficult to handle errors
consistently.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]