Closed dorongutman closed 3 years ago
It probably means that Cloudflare have changed their API and something is broken and returning a non-JSON error message.
You could try printing it out in lib/cloudflare/representation.rb:82 in 'process_response'
@ioquatix I don't think so, because using Postman (or plain old curl) returns successful results but the headers of the response still return as application/octet-stream
;
HTTP/1.1 200 OK
Date: Fri, 31 Jul 2020 12:35:27 GMT
Content-Type: application/octet-stream
Content-Length: 22
Connection: keep-alive
CF-Ray: REDACTED
Accept-Ranges: bytes
Cache-Control: no-store, no-cache, must-revalidate
CF-Cache-Status: DYNAMIC
cf-request-id: REDACTED
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
x-envoy-upstream-service-time: 209
Server: cloudflare
What is the content of the response, is it JSON?
in this specific case it's the string asd
(as you can see in the example code in the issue description), but it's the same results if it's a json string.
Ah I see so we should really allow a non-json response from this endpoint.
I have the following example code:
Running it in
rails c
gives the following: