You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportfunctionmiddleware(request: NextRequest){rollbar.configure({payload: {context: request.nextUrl.pathname}});rollbar.error('error!',(err,response)=>{// insufficient privileges: post_client_item scope is required but the access token only has post_server_item.console.log('error',err,response);});returnNextResponse.next();}
But as commented above, this causes insufficient privileges error.
If I change the server token to a client post token here:
Hi, I tried the Next.js App Router example. (#122)
I modified the middleware to log error.
Before
rollbar-react/examples/nextjs-approuter/src/app/middleware.ts
Lines 4 to 8 in 418412d
After
But as commented above, this causes
insufficient privileges
error.If I change the server token to a client post token here:
rollbar-react/examples/nextjs-approuter/src/rollbar.ts
Line 15 in 418412d
The middleware can log the error.
But should I use the client post token in the middleware?
Is there a way to recommend?
The text was updated successfully, but these errors were encountered: