fix: add 422 Error class and status_code to DataCiteError#99
Open
alee wants to merge 1 commit intoinveniosoftware:masterfrom
Open
fix: add 422 Error class and status_code to DataCiteError#99alee wants to merge 1 commit intoinveniosoftware:masterfrom
alee wants to merge 1 commit intoinveniosoftware:masterfrom
Conversation
b2ddb55 to
1015182
Compare
- add 422 Unprocessable Entity error class, resolves inveniosoftware#89 - minor refactoring to use a defaultdict data structure to map status codes to error classes instead of an if/elif conditional chain. - future status codes can be supported by adding a new DataCiteError subtype and an entry to the DataCiteErrorFactory.ERROR_CLASSES dictionary - includes the status code in the Error class so client code can retrieve the status code from the raised Exception, resolves inveniosoftware#98 defaults to DataCiteServerError for any unhandled status_code >= 500 and DataCiteRequestError if there is not an exact match
1015182 to
41be4e5
Compare
Contributor
|
Hi @alee. Sorry for the delay in looking at this. It looks like |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
use a defaultdict to map status codes to error classes, defaults to DataCiteServerError for status_code >= 500 and DataCiteRequestError for all others
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: