Repository navigation
fix(connectors): safely stringify failed batch response bodies before logging - #208
PANYAMHEMANTH wants to merge 3 commits into
Conversation
… logging Failed Microsoft Graph batch responses carry JSON error bodies, but the failure logging joined response["body"] values with a comma-joined string operation, which raises a TypeError for dict payloads. The broad exception handler swallowed that TypeError and logged it instead of the real API error. Failed responses are now serialized with json.dumps when the body is a dict or list, and stringified otherwise, before being joined into the log line. Assisted-by: DeepSeek V4.1 Flash Free (OpenCode)
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
The Google CLA check is green now and the change is ready for review. Could a maintainer take a look when they have a moment? I am happy to adjust anything. |
|
@NityamPareek — small follow-up in the same area as #209. |
Fixes #63
Summary
UrlInvoker.invoke()logged failed Microsoft Graph batch responses by joiningresponse["body"]values with a comma-joined string operation. Graph API errorpayloads are JSON objects, so
joinraises aTypeError, which the broadexception handler then swallowed and logged instead of the real API error.
Failed response bodies are now serialized with
json.dumpswhen they aredicts/lists and stringified otherwise, before being joined into the log line.
Testing
tests/util/connectors_test.pyregression test for the batchfailure-logging path; it fails with the old code and passes with the fix.