Skip to content

Commit 0571b54

Browse files
committed
Loosen response header check for RequestError
1 parent 4130f8d commit 0571b54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/xivapi/exceptions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module XIVAPI
22
class RequestError < StandardError
33
def initialize(response)
4-
if response.headers[:content_type] == 'application/problem+json'
4+
if response.headers[:content_type] =~ /json/
55
message = JSON.parse(response)['Message']
66
else
77
message = 'Error contacting the API.'

0 commit comments

Comments
 (0)