Skip to content
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

Extends error response #19

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Extends error response #19

wants to merge 1 commit into from

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
@@ -29,7 +29,7 @@ def key_value_query_format(hash)

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