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
Sometimes jwt-auth throws a native error (eg. if we feed a public key as a private key). Other times it throws a native object (for JSON errors thrown by the API). It will be helpful to have one type of error.
Actual Behaviour
In the case when an object is thrown as an error, the native object toString method will return [object Object]. Our error looks like Error retrieving the access token. [object Object] which is not optimal.
The text was updated successfully, but these errors were encountered:
Expected Behaviour
Let's say we have the following code:
Sometimes
jwt-auth
throws a native error (eg. if we feed a public key as a private key). Other times it throws a native object (for JSON errors thrown by the API). It will be helpful to have one type of error.Actual Behaviour
In the case when an object is thrown as an error, the native object
toString
method will return[object Object]
. Our error looks likeError retrieving the access token. [object Object]
which is not optimal.The text was updated successfully, but these errors were encountered: