lib/chatwork/chatwork_error.rb in chatwork-0.6.1 vs lib/chatwork/chatwork_error.rb in chatwork-0.6.2

- old
+ new

@@ -1,7 +1,9 @@ module ChatWork class ChatWorkError < StandardError def self.from_response(status, body, headers) + body ||= {} + if headers.has_key?("WWW-Authenticate") return AuthenticateError.from_www_authenticate( www_authenticate: headers["WWW-Authenticate"], status: status, error_response: body["errors"],