Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't hide errors inside app.mount fn #66764

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/core/public/application/ui/app_container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export const AppContainer: FunctionComponent<Props> = ({
})) || null;
} catch (e) {
// TODO: add error UI
// eslint-disable-next-line no-console
console.error(e);
Comment on lines +90 to +91
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshdover Mixed about whether this is acceptable until we actually implements the TODO or not. We should probably at least wrap this in if process.env === 'development', wdyt ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually just had an SDH where a customer could not see a dashboard because the app failed to mount on a corrupted saved object. Having a stack trace from production would have been a huge help. I'm ok with keep this for now until we get a UI

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. We really need to implement client-side logging API at some point to avoid these console.log

} finally {
setShowSpinner(false);
setIsMounting(false);
Expand Down