Skip to content

Commit

Permalink
don't catch InvalidURL or MissingSchema exceptions
Browse files Browse the repository at this point in the history
if these happen, it's pretty much a bug in our code, and so having the
full stacktrace would help (if the user doesn't provide the command)
  • Loading branch information
JacksonChen666 committed Jan 29, 2025
1 parent 69a85f5 commit ebe80ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions synadm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from http.client import HTTPConnection

import requests
from requests.exceptions import InvalidURL, MissingSchema, ConnectionError
from requests.exceptions import ConnectionError


def log_fatal_exit(error, logger, message=None):
Expand Down Expand Up @@ -161,10 +161,6 @@ def query(
f"{resp.status_code}")
return resp.json()
except ConnectionError as error:
log_fatal_exit(error, self.log)
except InvalidURL as error:
log_fatal_exit(error, self.log)
except MissingSchema as error:
log_fatal_exit(error, self.log, "Connection error. Please check "
"that Synapse can be reached.")
except Exception as error:
Expand Down

0 comments on commit ebe80ff

Please sign in to comment.