Skip to content

Error is always printed to console #2107

Open
@raubitzki94

Description

@raubitzki94

Checklist

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

  1. Try getAccessToken when refresh token and access token expired
  2. Catch the error
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions