Open
Description
Checklist
- The issue can be reproduced in the nextjs-auth0 sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
When the access token expires and the refresh token is not valid anymore the error in form of
ResponseBodyError: server responded with an error in the response body at checkOAuthBodyError (../src/index.ts:2657:8) at async processGenericAccessTokenResponse (../src/index.ts:3331:2) at async middleware (middleware.ts:36:4)
from the oauth4webapi library is always logged to console and poluting the server logs.
I would suggest removing the console.error line.
Reproduction
- Try getAccessToken when refresh token and access token expired
- Catch the error
- Still the error is logged to the console
Additional context
The Error from the oauth4webapi library is printed to the console.
nextjs-auth0 version
4.5.1
Next.js version
15.2.3
Node.js version
20.16.0