-
Notifications
You must be signed in to change notification settings - Fork 454
Open
Description
Version
20.0.2
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Angular ErrorHandler got [object Object] message when authWellknownEndpointUrl ends with http error. It is becouse here https://github.com/damienbod/angular-auth-oidc-client/blob/main/projects/angular-auth-oidc-client/src/lib/config/auth-well-known/auth-well-known.service.ts#L52 is throwError(() => new Error(error)); so everytime on error property will be called .toString() and [object Object] is passed to message.
Steps to reproduce the behavior
configure authWellknownEndpointUrl to not existing page. Instead 404 i got [object Object] message in ErrorHandler
A clear and concise description of what you expected to happen.
I expect i can handle HttpError as usual. So at https://github.com/damienbod/angular-auth-oidc-client/blob/main/projects/angular-auth-oidc-client/src/lib/config/auth-well-known/auth-well-known.service.ts#L52 instead throwError(() => new Error(error)); should be something like throwError(error) or throwError(() => error);.
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels