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 2020/12/16 07:40:15 UTC

[GitHub] [incubator-superset] nytai commented on a change in pull request #12011: refactor: PropertiesModal to typescript

nytai commented on a change in pull request #12011:
URL: https://github.com/apache/incubator-superset/pull/12011#discussion_r544076715



##########
File path: superset-frontend/src/views/CRUD/utils.tsx
##########
@@ -164,7 +164,7 @@ export function createErrorHandler(handleErrorFunc: (errMsg?: string) => void) {
   return async (e: SupersetClientResponse | string) => {
     const parsedError = await getClientErrorObject(e);
     logging.error(e);
-    handleErrorFunc(parsedError.message || parsedError.error);
+    handleErrorFunc((parsedError.message || parsedError.error) as string);

Review comment:
       This is likely due to the new type `message?: string | Record<string, any>;` above. We should probably handle the case for `Record<string, any>`. `JSON.stringify`? or perhaps we can find an elegant way to format these records into a human readable string. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org