Skip to content

Conversation

quanganh
Copy link

No description provided.

@quanganh quanganh force-pushed the extend-error-response branch from b188cb6 to 501d583 Compare January 18, 2018 11:46
def check_for_errors(response)
return unless error_response?(response)
raise MoodleError.new(response.parsed_response)
raise MoodleError.new(response.parsed_response.presence || response.response.inspect)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

006:0> response.parsed_response.presence || response.response.inspect
=> "#<Net::HTTPInternalServerError 500 Internal Server Error readbody=true>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any chance we could add a spec to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants