How to not log the auth errors
I'm using nextjs app router + supabase auth
when the refresh token is expired the auth errors are being logged in the server logs, does supabase js log them internally? because I can't seem to catch and handle these errors:
AuthApiError: Invalid Refresh Token: Refresh Token Not Found
at dk (.next/server/src/middleware.js:33:29611)
at async dm (.next/server/src/middleware.js:33:30585)
at async dl (.next/server/src/middleware.js:33:29995)
at async c (.next/server/src/middleware.js:33:66145)
at async (.next/server/src/middleware.js:33:66408) {
__isAuthError: true,
status: 400,
code: 'refresh_token_not_found'
}
3 Replies
Really think service is down
These can no longer be caught, there was some changes to the
@supabase/auth-js library some years back which stops you from actually catching this error. So no it always get logged in the console.I'm getting like 200k logs per minute because of this!