mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-03-25 08:55:49 +00:00
always parse as JSON
This commit is contained in:
parent
1da5c72eda
commit
96490cc9db
1 changed files with 2 additions and 2 deletions
|
|
@ -54,7 +54,7 @@ module Instapaper
|
|||
end
|
||||
|
||||
def fail_if_error_unparseable_response(response)
|
||||
response.parse
|
||||
response.parse(:json)
|
||||
rescue JSON::ParserError
|
||||
raise Instapaper::Error::ServiceUnavailableError
|
||||
end
|
||||
|
|
@ -74,7 +74,7 @@ module Instapaper
|
|||
|
||||
def parsed_response(response)
|
||||
@parsed_response ||= begin
|
||||
response.parse
|
||||
response.parse(:json)
|
||||
rescue
|
||||
response.body
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue