Skip to content

Commit

Permalink
Add preliminary check for 'event_id' and 'project' in the store method
Browse files Browse the repository at this point in the history
  • Loading branch information
sentry-autofix-experimental[bot] committed Mar 5, 2024
1 parent fa229ff commit d5cf775
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sentry/eventstore/processing/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def exists(self, event: Event) -> bool:
return self.get(key) is not None

def store(self, event: Event, unprocessed: bool = False) -> str:
if not event.get('event_id') or not event.get('project'):
logger.error(f\"store method called with event missing 'event_id' or 'project'. Event data: {event}\")
return
with sentry_sdk.start_span(op="eventstore.processing.store"):
key = cache_key_for_event(event)
if unprocessed:
Expand Down

0 comments on commit d5cf775

Please sign in to comment.