Skip to content

Commit

Permalink
API returns 204 when no data is available
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter authored and kipe committed Oct 16, 2024
1 parent 99d3295 commit 65aad9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nordpool/elspot.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ def _fetch_json(self, data_type, end_date=None, areas=None):
timeout=self.timeout,
)
response.raise_for_status()
if response.status_code == 204:
return None
return self._parse_json(response.json(), data_type, areas)

def fetch(self, data_type, end_date=None, areas=None):
Expand Down

0 comments on commit 65aad9a

Please sign in to comment.