<#3668 feat: Handle GraphQL error responses> Pull ...
# meltano-repo-activity
g
#3668 feat: Handle GraphQL error responses Pull request opened by Dexter2099 Closes #1421 Summary • detect GraphQL response payloads containing a non-empty
errors
field during response validation • raise
FatalAPIError
with the GraphQL error message instead of treating the response as successful • add regression coverage for GraphQL error payloads returned with HTTP 200 Testing •
uv run pytest tests/core/test_streams.py::test_graphql_validate_response_raises_for_errors -q
•
uv run pytest tests/core/test_streams.py -q
•
nox -rs tests-3.11 -- tests/core/test_streams.py
•
pre-commit run --files singer_sdk/streams/graphql.py tests/core/test_streams.py
Summary by Sourcery Handle GraphQL error payloads returned with HTTP 200 by validating the response body and surfacing errors as fatal API failures. Bug Fixes: • Treat GraphQL responses containing a non-empty errors field as failures and raise a FatalAPIError instead of treating them as successful responses. Tests: • Add regression tests covering GraphQL error payloads with HTTP 200, non-JSON and non-dict bodies, empty or missing errors fields, and alternate error structures. meltano/sdk