message: feat: Skip beforeSend when throwing internal exception
diff: @@ -363,7 +363,14 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
  };
  }
  - const finalEvent = beforeSend ? await beforeSend(prepared, hint) : prepared;
  + try {
  + const isInternalException = hint && hint.data && hint.data.__sentry__ === true;
  + let finalEvent: SentryEvent | null = prepared;
  +
  + if (!isInternalException && beforeSend) {
  + finalEvent = await beforeSend(prepared, hint);
  + }
  +
  if (finalEvent === null) {
  return {
  status: Status.Skipped,
  @@ -379,6 +386,18 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
  }
  return response;
  + } catch (exception) {
  + this.captureException(exception, {
  + data: {
  + __sentry__: true,
  + },
  + originalException: exception,
  + });
  +
  + return {
  + status: Status.Invalid,
  + };
  + }
  }
  /**
  