Skip to content
Permalink
Browse files

fix(board): improve gnes board 500 message

  • Loading branch information...
hanxiao committed Aug 2, 2019
1 parent 888aac8 commit fc5026da1ee0021abfefcefaee2ec41c0583b2c2
Showing with 7 additions and 0 deletions.
  1. +7 −0 gnes/composer/flask.py
@@ -39,6 +39,13 @@ def _create_flask_app(self):
args = set_composer_parser().parse_args([])
default_html = YamlComposer(args).build_all()['html']

@app.errorhandler(500)
def exception_handler(error):
self.logger.error('unhandled error, i better quit and restart!')
return '<h1>500 Internal Error</h1> ' \
'While we are fixing the issue, do you know you can deploy GNES board locally on your machine? ' \
'Simply run <pre>docker run -d -p 0.0.0.0:80:8080/tcp gnes/gnes compose --flask</pre>', 500

@app.route('/', methods=['GET'])
def _get_homepage():
return default_html

0 comments on commit fc5026d

Please sign in to comment.
You can’t perform that action at this time.