Skip to content

Commit

Permalink
Default error message to response.body
Browse files Browse the repository at this point in the history
  • Loading branch information
mjacobus committed Aug 16, 2022
1 parent b279dfc commit 12a4250
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/koine/rest_client/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ class Error < StandardError
def initialize(response)
@response = response
end

def message
@message ||= @response&.body
end
end

# 400
Expand Down

0 comments on commit 12a4250

Please sign in to comment.