Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle various exceptions #6

Open
3 tasks
t0ny-peng opened this issue Dec 29, 2018 · 0 comments
Open
3 tasks

Handle various exceptions #6

t0ny-peng opened this issue Dec 29, 2018 · 0 comments

Comments

@t0ny-peng
Copy link

t0ny-peng commented Dec 29, 2018

  • Bad Gateway
Traceback (most recent call last):
  File "/home/marge-bot/marge-bot/marge.app", line 3, in <module>
    marge.app.main()
  File "/home/marge-bot/marge-bot/marge/app.py", line 281, in main
    marge_bot.start()
  File "/home/marge-bot/marge-bot/marge/bot.py", line 42, in start
    self._run(repo_manager)
  File "/home/marge-bot/marge-bot/marge/bot.py", line 56, in _run
    projects = self._get_projects()
  File "/home/marge-bot/marge-bot/marge/bot.py", line 70, in _get_projects
    my_projects = Project.fetch_all_mine(self._api)
  File "/home/marge-bot/marge-bot/marge/project.py", line 32, in fetch_all_mine
    {'membership': True, 'with_merge_requests_enabled': True},
  File "/home/marge-bot/marge-bot/marge/gitlab.py", line 61, in collect_all_pages
    page = self.call(get_command.for_page(page_no))
  File "/home/marge-bot/marge-bot/marge/gitlab.py", line 55, in call
    raise error(response.status_code, err_message)
marge.gitlab.InternalServerError: (502, 'Bad Gateway')
  • Connection refused
Traceback (most recent call last):
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f90ab1bd2b0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gitlab.apex.ai', port=443): Max retries exceeded with url: /api/v4/projects?with_merge_requests_enabled=true&membership=true&page=1&per_page=100 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f90ab1bd2b0>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marge-bot/marge-bot/marge.app", line 3, in <module>
    marge.app.main()
  File "/home/marge-bot/marge-bot/marge/app.py", line 281, in main
    marge_bot.start()
  File "/home/marge-bot/marge-bot/marge/bot.py", line 42, in start
    self._run(repo_manager)
  File "/home/marge-bot/marge-bot/marge/bot.py", line 56, in _run
    projects = self._get_projects()
  File "/home/marge-bot/marge-bot/marge/bot.py", line 70, in _get_projects
    my_projects = Project.fetch_all_mine(self._api)
  File "/home/marge-bot/marge-bot/marge/project.py", line 32, in fetch_all_mine
    {'membership': True, 'with_merge_requests_enabled': True},
  File "/home/marge-bot/marge-bot/marge/gitlab.py", line 61, in collect_all_pages
    page = self.call(get_command.for_page(page_no))
  File "/home/marge-bot/marge-bot/marge/gitlab.py", line 20, in call
    response = method(url, headers=headers, **command.call_args)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gitlab.apex.ai', port=443): Max retries exceeded with url: /api/v4/projects?with_merge_requests_enabled=true&membership=true&page=1&per_page=100 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f90ab1bd2b0>: Failed to establish a new connection: [Errno 111] Connection refused',))
  • Name resolution error
Traceback (most recent call last):
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7ff3ba868ba8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/marge-bot/.local/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gitlab.apex.ai', port=443): Max retries exceeded with url: /api/v4/projects?per_page=100&with_merge_requests_enabled=true&membership=true&page=1 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff3ba868ba8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marge-bot/marge-bot/marge.app", line 3, in <module>
    marge.app.main()
  File "/home/marge-bot/marge-bot/marge/app.py", line 281, in main
    marge_bot.start()
  File "/home/marge-bot/marge-bot/marge/bot.py", line 42, in start
    self._run(repo_manager)
  File "/home/marge-bot/marge-bot/marge/bot.py", line 56, in _run
    projects = self._get_projects()
  File "/home/marge-bot/marge-bot/marge/bot.py", line 70, in _get_projects
    my_projects = Project.fetch_all_mine(self._api)
  File "/home/marge-bot/marge-bot/marge/project.py", line 32, in fetch_all_mine
    {'membership': True, 'with_merge_requests_enabled': True},
  File "/home/marge-bot/marge-bot/marge/gitlab.py", line 61, in collect_all_pages
    page = self.call(get_command.for_page(page_no))
  File "/home/marge-bot/marge-bot/marge/gitlab.py", line 20, in call
    response = method(url, headers=headers, **command.call_args)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/marge-bot/.local/lib/python3.5/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gitlab.apex.ai', port=443): Max retries exceeded with url: /api/v4/projects?per_page=100&with_merge_requests_enabled=true&membership=true&page=1 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff3ba868ba8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant