Skip to content

fix: avoid critical logs for argument validation failures (#1193) - #1248

Open
ousamabenyounes wants to merge 1 commit into
overblog:masterfrom
ousamabenyounes:fix/issue-1193
Open

fix: avoid critical logs for argument validation failures (#1193)#1248
ousamabenyounes wants to merge 1 commit into
overblog:masterfrom
ousamabenyounes:fix/issue-1193

Conversation

@ousamabenyounes

@ousamabenyounes ousamabenyounes commented Aug 10, 2026

Copy link
Copy Markdown
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Documented? no
Fixed tickets #1193
License MIT

Problem

ArgumentsValidationException represents invalid client input, but
ErrorLoggerListener treated it like an unknown server exception and logged it at
CRITICAL.

Fix

Treat ArgumentsValidationException like UserError: log its previous cause at
ERROR when one exists, and do not emit a CRITICAL entry for a routine validation
failure without a previous cause.

The condition is deliberately limited to ArgumentsValidationException.
Other exceptions implementing ClientAware retain their existing CRITICAL logging,
because client-safe messages do not necessarily indicate client-caused failures.

Test verification (RED → GREEN)

The two argument-validation cases fail on the unmodified base because they reach the
CRITICAL fallback:

FAILURES!
Tests: 11, Assertions: 10, Failures: 2, Risky: 1.

An additional regression case failed against the earlier generic ClientAware
implementation because the expected CRITICAL log was suppressed:

FAILURES!
Tests: 11, Assertions: 11, Failures: 1.
Method was expected to be called 1 time, actually called 0 times.

With the final scoped implementation:

OK (11 tests, 11 assertions)

The full suite remains iso-baseline: the same five pre-existing
GraphDumpSchemaCommandTest failures occur on master; the final run reports
Tests: 715, Assertions: 1722, Failures: 5, Skipped: 8.

Treat ArgumentsValidationException like UserError: log its previous cause at
ERROR when present, and do not emit a CRITICAL entry for routine validation
failures. Other ClientAware exceptions retain their existing CRITICAL logging.
@ousamabenyounes ousamabenyounes changed the title fix: log client-safe exceptions at ERROR instead of CRITICAL (#1193) fix: avoid critical logs for argument validation failures (#1193) Aug 20, 2026
@ousamabenyounes

Copy link
Copy Markdown
Author

Updated in 9bbc592e: the fix now applies only to ArgumentsValidationException; other client-safe exceptions retain their existing CRITICAL logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant