Skip to content

Improve error message when /api/bootstrap request fails #6

Description

@SpaceK33z

Right now you get a long stack trace if the request to backend fails:

Traceback (most recent call last):
   File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
     timeout=timeout
   File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
     _stacktrace=sys.exc_info()[2])
   File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
     raise MaxRetryError(_pool, url, error or ResponseError(cause))
 urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='backend', port=8000): Max retries exceeded with url: /api/bootstrap/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc9fa8ebe48>: Failed to establish a new connection: [Errno 111] Connection refused',))

But a human error like "Request to http://localhost:8000/api/bootstrap failed" would suffice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions