-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Wrong API Error Message #227
Conversation
Generated by 🚫 Danger Swift against 2ffa1eb |
)?.statusCode ?? 500, httpError.error) | ||
} | ||
throw SmileIDError.httpError( | ||
(urlSessionResponse.response as? HTTPURLResponse)?.statusCode ?? 500, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 500? Android doesn't have this or am I missing it? if android doesn't have it we shouldn't hard code this but rather throw the error itself for the sake of the wrappers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We fallback to 500 by default on iOS - this has always been the behaviour actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps try throwing the original error instead of falling back to a default code. This might make it easier to handle edge cases without introducing misleading server errors where none exist.
Part of #230 |
Story: https://app.shortcut.com/smileid/story/13459/ios-fix-wrong-message-from-the-api
Summary
A few sentences/bullet points about the changes
Known Issues
Any shortcomings in your work. This may include corner cases not correctly handled or issues related
to but not within the scope of your PR. Design compromises should be discussed here if they were not
already discussed above.
Test Instructions
Concise test instructions on how to verify that your feature works as intended. This should include
changes to the development environment (if applicable) and all commands needed to run your work.
Screenshot
If applicable (e.g. UI changes), add screenshots to help explain your work.