Builder republish reports a JSON decode error on a successful bodyless 201 response

Open Beginner friendly
#1,447 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in _make_config_api_request in airbyte/_util/api_util.py, which currently skips JSON decoding only for HTTP 204. Check how it handles a successful 201 with an empty body and where response.json() is called. Done when an empty body on any successful Config API response returns {} and nonempty bodies still parse as JSON, with a test covering the bodyless 201 case.

Written by the indexing model from the issue text.

Description

Summary

Republishing an existing Connector Builder project through the Cloud MCP tools reports a tool error even though the new manifest version is published and activated.

Details

  • Republishing calls POST /v1/declarative_source_definitions/create_manifest (create_declarative_manifest_version in airbyte/_util/api_util.py).
  • The API returns HTTP 201 with an empty body for this endpoint.
  • _make_config_api_request only skips JSON decoding for HTTP 204, so it calls response.json() on the empty 201 body and raises requests.exceptions.JSONDecodeError.
  • The MCP tool surfaces this as a failure, so an agent (or user) may retry or report a failed publish that actually succeeded.

Expected behavior

Any successful Config API response with an empty body is treated as {}; nonempty bodies are still parsed as JSON.

Context

Found while validating the Connector Builder MCP tools for GA. The secret-preservation bug found in the same validation is tracked separately.

Requested by @aaronsteers.


Posted by Devin, on behalf of @aaronsteers.

Dominant language
Python
Stars
342
Forks
82
Avg merge
1d 7h
Merged PRs (30d)
74

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from airbytehq/PyAirbyte

All issues in airbytehq/PyAirbyte

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.