<@U04S8PLJWMT> I'm using Airbyte Cloud to develop ...
# ask-ai
a
@kapa.ai I'm using Airbyte Cloud to develop a new async connector from the UI. I’m stuck on the last step: decoding the gzip response I receive from the API in the response body. I’ve tried using Download HTTP Response Format = GZIP and Decoder = JSON, but it throws the following error:
Copy code
airbyte_cdk.utils.traced_exception.AirbyteTracedException: Response JSON data failed to be parsed.
How to handle this in Airbyte Cloud, given that we’re not allowed to use custom decoders? The RAW response is something like that:
{ "status": 200, "body": "\u001f�\b\u0000\u0000\
k
In the Connector Builder UI, gzip-compressed responses must be decoded by selecting an outer “gzip” response format and then nesting an inner decoder (e.g., JSON). If the API’s response is gzip but does not include Content-Encoding: gzip, some services may mis-detect and try to parse bytes as JSON, causing the parsing error you’re seeing. Workarounds you can apply in Airbyte Cloud (no custom code needed): - Use a nested decoder: set Download HTTP Response Format to Gzip, then set its inner decoder to JSON. If the server’s headers still cause mis-detection, nest gzip twice, then JSON (gzip → gzip → JSON). This pattern is known to work around missing gzip headers in some cases. [[ZIP and gzip](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/record-processing#zip-and-gzip); [GzipDecoder](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/GzipDecoder)] Why this helps: the Connector Builder supports recursive/nested decoders for compressed responses, so Airbyte can unwrap multiple layers (and, in edge cases, compensate for header issues) before handing the payload to the JSON decoder. [[ZIP and gzip](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/record-processing#zip-and-gzip); [GzipDecoder](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/GzipDecoder)] If you still hit the same error after nesting gzip → gzip → JSON, the knowledge sources don’t provide further Cloud-side configuration beyond nested decoders. In that case, this looks like the known issue where missing Content-Encoding breaks decoding; the community has used the double-gzip workaround successfully while awaiting a CDK-side fix. [[Issue 56988](https://github.com/airbytehq/airbyte/issues/56988)] Summary setup in the Download tab: - Download HTTP Response Format: Gzip - Decoder: Gzip - Decoder: JSON Also ensure your Record Selector and Primary Key are set appropriately for the decoded JSON. [[Download tab](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/async-streams#download-tab)]
a
My response header to you give me a more precise answer please
Copy code
"Content-Encoding": "identity",
    "Accept-Ranges": "bytes",
    "Content-Type": "application/json; charset=utf-8",
    "Content-Length": "5189",
    "Server": "AmazonS3"
@kapa.ai My response header to you give me a more precise answer please
Copy code
"Content-Encoding": "identity",
    "Accept-Ranges": "bytes",
    "Content-Type": "application/json; charset=utf-8",
    "Content-Length": "5189",
    "Server": "AmazonS3"
k
A message from kapa.ai
Thanks for the headers. Given: - Content-Encoding: identity - Content-Type: application/json; charset=utf-8 …but the body is actually gzip bytes, you’ll need to force nested decoding in the Connector Builder. Do this in the Download HTTP Response Format: - Set Format: Gzip - Decoder: Gzip - Decoder: JSON (encoding: utf-8) This “gzip → gzip → JSON” chain works around cases where servers don’t advertise gzip encoding correctly, as supported by nested decoders in the Builder. [[ZIP and gzip](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/record-processing#zip-and-gzip); [GzipDecoder](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/GzipDecoder)] If the error persists, the knowledge sources indicate no additional Cloud-side configuration beyond nested decoders; this header-mismatch issue is known, and the community workaround is the double-gzip approach while a CDK-side improvement is discussed. [[Issue 56988](https://github.com/airbytehq/airbyte/issues/56988)]