lib/honeybadger/backend/base.rb in honeybadger-3.0.2 vs lib/honeybadger/backend/base.rb in honeybadger-3.1.0
- old
+ new
@@ -43,10 +43,15 @@
def success?
@success
end
def error_message
- FRIENDLY_ERRORS[code] || message
+ return message if code == :error
+ return FRIENDLY_ERRORS[code] if FRIENDLY_ERRORS[code]
+ return error if error =~ NOT_BLANK
+ msg = "The server responded with #{code}"
+ msg << ": #{message}" if message =~ NOT_BLANK
+ msg
end
private
def parse_error(body)