Next.js Discord

Discord Forum

res.revalidate() broken with Pages API & Sentry

Unanswered
European pilchard posted this in #help-forum
Open in Discord
European pilchardOP
Hi folks, I'm trying to track down why res.revalidate() is broken with Sentry. Minimal repro here: https://repro-nextjs-revalidate-sentry.vercel.app/ - https://github.com/statico/repro-nextjs-revalidate-sentry — I wrote to support months ago and they said it's a problem with Sentry that other users are experiencing but there's no resolution.

Can anyone save me some time and tell me where to look into the Next.js source too investigate this? I'm trying to figure out exactly what res.revalidate() does.

1 Reply

European pilchardOP
FYI, figured it out. Cloudflare was blocking Next.js' revalidation requests. and the relevant code is here: https://github.com/vercel/next.js/blob/canary/packages/next/src/server/api-utils/node/api-resolver.ts#L249