Skip to content

Commit

Permalink
Extends error response
Browse files Browse the repository at this point in the history
  • Loading branch information
quanganh committed Jan 18, 2018
1 parent 5983e86 commit 501d583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/moodle_rb/utility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
end

private
Expand Down

0 comments on commit 501d583

Please sign in to comment.