Skip to main content
The SDK captures uncaught errors. Report an error explicitly when your application catches it and you still need it in Interfere.

Browser errors

Choose your framework’s browser entry point:
Here, saveDraft is your application’s operation. Keep its existing error handling after reporting the error.

Server errors

Import captureError from your framework’s server entry point:

Custom spans

Wrap application work to record its duration and outcome. In the Next.js browser SDK, use span:
In Node.js and NestJS, use withSpan:

Next.js proxy

Wrap your existing proxy handler with withInterfereProxy. The wrapper reports thrown errors with request context and rethrows them.
proxy.ts
Replace NextResponse.next() with your existing proxy logic.

Next.js server actions

Wrap an action’s work with withInterfereServerAction to record its name and outcome. Its args option records argument types, not values. Thrown errors reach the onRequestError handler from your server instrumentation.