Expected behaviour
The stack trace should include the call to Issuer.discover() and everything leading up to that. This is the case when the request is successful but a HTTP error, such as 404, is returned:
> await Issuer.discover('https://example.com')
Uncaught OPError: expected 200 OK, got: 404 Not Found
at processResponse (/app/node_modules/openid-client/lib/helpers/process_response.js:41:11)
at Issuer.discover (/app/node_modules/openid-client/lib/issuer.js:179:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async REPL2:1:33 {
error: 'expected 200 OK, got: 404 Not Found'
}
Environment:
openid-client version: 5.4.0
node version: v16..19.0
Additional context
[x] the bug is happening on latest openid-client too.
[x] i have searched the issues tracker on github for similar issues and couldn't find anything related.
Describe the bug
Below-HTTP errors, e.g. connection reset, during
Issuer.discover()
throw errors without a useful stack trace. Example:To Reproduce Issuer and Client configuration: N/A - Crash occurred before these could be constructed.
Steps to reproduce the behaviour:
Expected behaviour The stack trace should include the call to
Issuer.discover()
and everything leading up to that. This is the case when the request is successful but a HTTP error, such as 404, is returned:Environment:
Additional context