From cf743d362ad828e6ba07c75188f4814f84acdfbc Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 19 Nov 2019 19:01:07 +0100 Subject: [PATCH] Gestion d'erreurs --- source/sites/publi.codes/Yo.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/sites/publi.codes/Yo.js b/source/sites/publi.codes/Yo.js index d58261ff2..aa348244b 100644 --- a/source/sites/publi.codes/Yo.js +++ b/source/sites/publi.codes/Yo.js @@ -105,7 +105,16 @@ class ErrorBoundary extends React.Component { render() { return ( <> - {this.state.error &&

Erreur : {JSON.stringify(this.state.error)}

} + {this.state.error && ( +

+ Erreur :{' '} + { + this.state.error.message.split( + 'The error may be correlated with' + )[0] + } +

+ )} {this.props.children} )