-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OA: retry 10 times to harvest data from CDS
- Loading branch information
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class WrongInput(Exception): | ||
def __init__(self, input, current_year): | ||
super().__init__( | ||
f"Wrong input. Input should be digits and in range of 2004 to {current_year}: {input}" | ||
) | ||
|
||
|
||
class DataFetchError(Exception): | ||
def __init__(self, status_code, url): | ||
super().__init__(f"Data fetch failure, status_code={status_code}, url={url}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters