Skip to content

Commit

Permalink
check http error occurred (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
moas authored Jan 26, 2025
1 parent b490700 commit 893298a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyoscar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ def get_stations(self, program: str = None, country: str = None,
LOGGER.debug(f'Request: {response.url}')
LOGGER.debug(f'Response: {response.status_code}')

response.raise_for_status()

return response.json()

def get_contact(self, country: str, surname: str,
Expand Down

0 comments on commit 893298a

Please sign in to comment.