Skip to content

Silence duplicate JSON parse error logs#55

Merged
hemanth-asirvatham merged 1 commit intomainfrom
fix-json-parsing-error-message-silencing
Feb 10, 2026
Merged

Silence duplicate JSON parse error logs#55
hemanth-asirvatham merged 1 commit intomainfrom
fix-json-parsing-error-message-silencing

Conversation

@hemanth-asirvatham
Copy link
Collaborator

Motivation

  • Remove repeated JSON parse warnings that were being emitted multiple times and double-printed.
  • Align JSON parse error logging behaviour with other error types (timeouts, rate limits, connections) so only the first occurrence is prominently logged and later occurrences are silenced and tracked.

Description

  • Added a first_json_parse_logged flag in src/gabriel/utils/openai_utils.py to track whether a JSON parse warning has been emitted.
  • Introduced a _log_json_parse_once helper which emits a first-occurrence message (via _emit_first_error) and then silences subsequent JSON parse errors by logging them at debug level.
  • Replaced the direct _emit_first_error call in the JSONParseError handler with _log_json_parse_once(error_detail).
  • Removed a duplicate logger.warning for non-timeout API errors to avoid double emission of the same warning.

Testing

  • No automated tests were run for this change.

Codex Task

@hemanth-asirvatham hemanth-asirvatham merged commit cfeac5a into main Feb 10, 2026
1 check failed
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant