# Fix: beforeSend silently dropping every event
## The symptom
No events arrive. No errors in the SDK logs, no failed requests, no quota issues. The SDK initializes fine and captures nothing.
## The cause
`beforeSend` must return the event. If it returns `null` or `undefined`, the event is discarded silently, by design. The usual ways this happens:
```js
// drops EVERYTHING: no return statement
Sentry.init({
beforeSend(event) {
scrub(event);
},
});
```
```js
// drops everything that is not a TypeError
Sentry.init({
beforeSend(event) {
if (event.exception.values[0].type === "TypeError") {
return event;
}
// implicit undefined for everything else
},
});
```
Arrow-function bodies without braces have the same trap: `beforeSend: (e) => { scrub(e); }` returns undefined.
## The fix
Always return the event at the end, and return `null` only deliberately:
```js
beforeSend(event) {
scrub(event);
if (shouldIgnore(event)) return null; // deliberate drop
return event; // everything else ships
}
```
## Confirmation
Add a temporary log line inside `beforeSend` printing the event ID and the return value. If the log fires but nothing arrives, the hook is eating events. If the log never fires, the problem is earlier (init order, DSN, transport).
## Verify
Remove the log line, keep the explicit return, and confirm events flow. As a rule, treat any `beforeSend` without a final `return event` as a bug during code review.