Support
Troubleshooting
Fix common setup issues around config loading, missing environment variables, adapters, retries, and response transforms.
Config is not being used
The most explicit fix is to import the config in the route and use the bound helper.
import passit from "@/passit.config";
export async function GET(req: NextRequest) {
return passit.passIt({ path: "/users", req });
}If you use package-level passIt, confirm instrumentation.ts exists at the project root.
export async function register() {
await import("./passit.config");
}Environment variables are undefined
Check .env.local or your hosting provider settings, then restart the dev server.
Axios adapter fails
Install Axios when using http: "axios".
npm install axiosTransformer gets normalized data
response runs after normalize. Disable normalization when the transformer needs raw upstream data.
return passIt({
path: "/users",
req,
normalize: false,
response: (data) => data,
});Retries are not happening
Retries only happen for statuses listed in retry.onStatus, plus network errors and adapter exceptions.
retry: {
times: 2,
onStatus: [500, 502, 503],
}Query params or body are missing upstream
Pass req when the route depends on incoming client input.
export async function POST(req: NextRequest) {
return passIt({ path: "/users", req });
}If req is omitted, PassIt makes a server-initiated request and does not forward query params, body, or client headers.
HTML response becomes null
PassIt consumes HTML responses and returns null. Use JSON or plain text upstream responses when the route needs to return content directly.