-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactor: Handle response errors status #240
Refactor: Handle response errors status #240
Conversation
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.
Thanks for the pull request Syphax. There's an issue with the create method in the SubmissionsController - I entered a comment with more details on line 25.
Hi, @jvendetti |
24efec1
to
2052c31
Compare
Context
Before ncbo/ontologies_api_ruby_client#13, the HTTP requests (update or create) return
nil
(ruby null) if successful and the response body if error.After merging ncbo/ontologies_api_ruby_client#13, now all the HTTP would return a response, success, or error.
Issue
the old way of testing if the response is a success (
response.nil?
) will no more work because we don't return nil if successSolution
Now the code will test the response status to know if it is a success or not
Changes
response_error?
helper