Circle V2 API Docs
    Preparing search index...

    Function throwTRPCError

    • Throws a TRPCError derived from the given CircleError's band.

      Use this in procedures/middleware that handle a Safe error explicitly:

      const { data, error } = await repo.doThing();
      if (error) throwTRPCError(error);

      For the common case you can instead unwrap() the result and let the error bubble; the errorBandMiddleware will map it automatically.

      Parameters

      Returns never