Skip to content

Commit 6c1c872

Browse files
ImTotemclaude
andcommitted
fix(graphql): skip client-side validation errors in error logging
GraphQL validation errors (unknown fields, syntax) have no original_error — these are client mistakes, not server errors. Skip them to avoid noisy Slack alerts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 275f127 commit 6c1c872

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/bcsd_api/graphql/schema.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class Mutation:
5959
class _Schema(strawberry.Schema):
6060
def process_errors(self, errors: List[GraphQLError], execution_context: ExecutionContext | None = None) -> None:
6161
for err in errors:
62+
if not err.original_error:
63+
continue
6264
if isinstance(err.original_error, AppException):
6365
continue
6466
logger.error(err.message, exc_info=err.original_error)

0 commit comments

Comments
 (0)