Skip to content

Commit

Permalink
fix: remove logic from error handler to increase fault tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Aug 20, 2021
1 parent 94e535e commit eb3944f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions grow/server/handlers.py
Expand Up @@ -68,9 +68,6 @@ def serve_exception(pod, request, exc, **_kwargs):
'status': status,
'traceback': formatted_traceback,
}
home_doc = pod.get_home_doc()
if home_doc and home_doc.exists:
kwargs['home_url'] = home_doc.url.path
if (isinstance(exc, errors.BuildError)):
kwargs['build_error'] = exc.exception
if (isinstance(exc, errors.BuildError)
Expand Down
1 change: 1 addition & 0 deletions grow/server/manager.py
Expand Up @@ -68,6 +68,7 @@ def print_server_ready_message(pod, host, port):
home_doc = pod.get_home_doc()
root_path = home_doc.url.path if home_doc and home_doc.exists else '/'
except:
# Allow the user to fix the problem without restarting the server manually.
root_path = '/'
pod.logger.exception('Failed to determine root URL path.')
url_base = 'http://{}:{}/'.format(host, port)
Expand Down

0 comments on commit eb3944f

Please sign in to comment.