Thrown AggregateError
object contains the JS callstack in its message
#336
Labels
AggregateError
object contains the JS callstack in its message
#336
Describe the bug
When
Issuer.discover
is called with an invalid or wrong URL, the thrown error contains the JS callstack in itsmessage
property. This is a security issue since many times the error message is being sent to the end-users of a product.To Reproduce
Issuer and Client configuration: (inline or gist) - Don't forget to redact your secrets.
Steps to reproduce the behaviour:
Expected behaviour
Instead of logging both failed promises errors callstacks it should only show their respective messages.
Environment:
Additional context
This seems to be related to the default and uncustomisable behaviour of
aggregate-error
which is used byp-any
andp-some
. I've currently devised a quite gross but functional workaround:The text was updated successfully, but these errors were encountered: