Making it possible to access the details of error responses from the API (see #4)#5
Open
11BelowStudio wants to merge 2 commits into
Open
Making it possible to access the details of error responses from the API (see #4)#511BelowStudio wants to merge 2 commits into
11BelowStudio wants to merge 2 commits into
Conversation
Owner
|
Hi Rachel.
Just to avoid having to deal will null checks. I will spend some time on this soon. |
…st keeping the unsafe direct method of accessing it available.
Contributor
Author
|
I've had a cunning plan. The (The alternatives would probably be to change the |
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.
Here's an implementation for #4.
If a
NeoCitiesApiErrorwas built from aBaseResponseinstance, that response will now be stored in theNeoCitiesApiErrorinstance, and can be accessed later on. If it was built from aThrowable, that field will just be null.The existing error message building logic, and the now-redundant
public NeoCitiesApiError(final String message)constructor have been retained for sake of consistency.