Skip to content

Commit efc3b5a

Browse files
grichaclaude
andcommitted
fix(hybridcloud): Handle null meta in RPC endpoint
request.data.get("meta", {}) returns None when the payload contains "meta": null, since the default only applies for missing keys. Use `or {}` to handle both missing and null values, preventing an AttributeError on the subsequent .get() call. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d25c815 commit efc3b5a

File tree

1 file changed

+1
-1
lines changed
  • src/sentry/api/endpoints/internal

1 file changed

+1
-1
lines changed

src/sentry/api/endpoints/internal/rpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def post(self, request: Request, service_name: str, method_name: str) -> Respons
6464
sentry_sdk.capture_exception()
6565
raise ParseError from e
6666

67-
meta = request.data.get("meta", {})
67+
meta = request.data.get("meta") or {}
6868
vc_data = meta.get("viewer_context")
6969
vc_scope: contextlib.AbstractContextManager[None] = contextlib.nullcontext()
7070
if vc_data:

0 commit comments

Comments
 (0)