Add global error bubble

Summary: Improved the display of error messages. Where previously only one error message could be displayed (quite obtrusively), with this change multiple errors can now be displayed and stack traces and further info can be hidden.

Reviewed By: passy

Differential Revision: D18036569

fbshipit-source-id: 2bc3dfa7a5196f931370a6e6dbf27c55b6cfb2bf
This commit is contained in:
Michel Weststrate
2019-10-22 08:45:11 -07:00
committed by Facebook Github Bot
parent d350e1b339
commit 3b1429b8b0
6 changed files with 303 additions and 46 deletions

View File

@@ -49,14 +49,14 @@ export default (store: Store, logger: Logger) => {
});
server.addListener('error', err => {
const payload: string =
const message: string =
err.code === 'EADDRINUSE'
? "Couldn't start websocket server. Looks like you have multiple copies of Flipper running."
: err.message || 'Unknown error';
store.dispatch({
type: 'SERVER_ERROR',
payload,
payload: {message},
});
});