Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Leaks API key on exception #187

Copy link
Copy link
@ricardobranco777

Description

@ricardobranco777
Issue body actions

The quick way to test it is with no Internet connection:

import os
import logging
from bugzilla import Bugzilla
from bugzilla.exceptions import BugzillaError
from requests.exceptions import RequestException

URL = os.getenv("URL", "https://bugzilla.suse.com")
USER = os.getenv("USER", "test")
API_KEY = "MYAPIKEY"

try:
    client = Bugzilla(URL, force_rest=True, user=USER, api_key=API_KEY)
except (BugzillaError, RequestException) as exc:
    error = exc
    logging.error("%s", exc)

ERROR:root:HTTPSConnectionPool(host='bugzilla.suse.com', port=443): Max retries exceeded with url: /rest/version?Bugzilla_api_key=MYAPIKEY (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f48458cbf90>: Failed to resolve 'bugzilla.suse.com' ([Errno -3] Temporary failure in name resolution)"))

The only workaround is to catch requests.exceptions.ConnectionError.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.