Unified · Split
| @@ -35,7 +35,11 @@ module Docs · 34 unmodified lines | |||
| 35 | 35 | ||
| 36 | def process_response?(response) | 36 | def process_response?(response) |
| 37 | if response.error? | 37 | if response.error? |
| 38 | raise "Error status code (#{response.code}): #{response.return_message}\n#{response.url}" | 38 | raise <<~ERROR |
| 39 | Error status code (#{response.code}): #{response.return_message} | ||
| 40 | #{response.url} | ||
| 41 | #{JSON.pretty_generate(response.headers).slice(2..-3)} | ||
| 42 | ERROR | ||
| 39 | elsif response.blank? | 43 | elsif response.blank? |
| 40 | raise "Empty response body: #{response.url}" | 44 | raise "Empty response body: #{response.url}" |
| 41 | end | 45 | end |