Skip to content

Commit

Permalink
fix #2757 - Improved error messaging on startup time application indu…
Browse files Browse the repository at this point in the history
…ced import error (#2770)

Co-authored-by: Adam Hopkins <adam@amhopkins.com>
  • Loading branch information
moshe742 and ahopkins committed Jul 5, 2023
1 parent f2cc83c commit f48506d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sanic/cli/app.py
Expand Up @@ -180,6 +180,10 @@ def _get_app(self, app_loader: AppLoader):
" Example File: project/sanic_server.py -> app\n"
" Example Module: project.sanic_server.app"
)
error_logger.error(
"\nThe error below might have caused the above one:\n"
f"{e.msg}"
)
sys.exit(1)
else:
raise e
Expand Down

0 comments on commit f48506d

Please sign in to comment.