We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4130f8d commit 0571b54Copy full SHA for 0571b54
lib/xivapi/exceptions.rb
@@ -1,7 +1,7 @@
1
module XIVAPI
2
class RequestError < StandardError
3
def initialize(response)
4
- if response.headers[:content_type] == 'application/problem+json'
+ if response.headers[:content_type] =~ /json/
5
message = JSON.parse(response)['Message']
6
else
7
message = 'Error contacting the API.'
0 commit comments