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/04/29 00:09:15 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #9677: feat(errors): add client scaffolding for custom error messages

etr2460 commented on a change in pull request #9677:
URL: https://github.com/apache/incubator-superset/pull/9677#discussion_r416997806



##########
File path: superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx
##########
@@ -19,19 +19,32 @@
 import React, { useState } from 'react';
 // @ts-ignore
 import { Alert, Collapse } from 'react-bootstrap';
+import getErrorMessageComponentRegistry from './getErrorMessageComponentRegistry';
+import { SupersetError } from './types';
 
-interface Props {
-  message: string;
+type Props = {
+  error?: SupersetError;
   link?: string;
+  message: string;
   stackTrace?: string;
-}
+};
 
 export default function ErrorMessageWithStackTrace({
+  error,
   message,
   link,
   stackTrace,
 }: Props) {
   const [showStackTrace, setShowStackTrace] = useState(false);
+
+  // Check if a custom error message component was registered for this message

Review comment:
       this is essentially a no-op today as we haven't registered any error messages and this component will never get a new error object passed in.




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