auth0/auth0-react

OAuthError is not callable

elstgav opened this issue · 1 comments

Checklist

Description

Introduced in #638; trying to call new OAuthError('name', 'message') returns the following error:

errors.tsx:10 Uncaught TypeError: Class constructor d cannot be invoked without 'new'
    at new OAuthError (errors.tsx:10:1)
    at <anonymous>:1:1

In this case d refers to GenericError.

Expected result is to return an error object.

Reproduction

  1. Call new OAuthError('name', 'message')

Additional context

No response

auth0-react version

2.2.3

React version

17.0.2

Which browsers have you tested in?

Chrome