Como filtrar EntityNotFoundException?

Estou querendo que o sentry não exiba erros com a exception → EntityNotFoundException

import io.sentry.SentryEvent;
import io.sentry.SentryOptions;
import org.springframework.stereotype.Component;

@Component
public class CustomBeforeSendCallback implements SentryOptions.BeforeSendCallback {
@Override
public SentryEvent execute(SentryEvent event, Object hint) {
if (event.getThrowable() instanceof EntityNotFoundException)
return null;
}
return event;
}
}