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
When making a call to the workflow coordinator's '/status/:statusCredentialId' endpoint with a statusCredentialId for which there is no status list, the coordinator calls the status-service, which correctly returns a 404, which the workflow-coordinator middleware handles, but the workflow coordinator's '/status/:statusCredentialId' method still incorrectly tries to return a second response (a 500), which crashes the server with error:
node:internal/errors:496
ad-coordinator | ErrorCaptureStackTrace(err);
ad-coordinator | ^
ad-coordinator |
ad-coordinator | Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
ad-coordinator | at new NodeError (node:internal/errors:405:5)
ad-coordinator | at ServerResponse.setHeader (node:_http_outgoing:648:11)
ad-coordinator | at ServerResponse.header (/app/node_modules/express/lib/response.js:767:10)
ad-coordinator | at ServerResponse.send (/app/node_modules/express/lib/response.js:170:12)
ad-coordinator | at ServerResponse.json (/app/node_modules/express/lib/response.js:267:15)
ad-coordinator | at ServerResponse.send (/app/node_modules/express/lib/response.js:158:21)
ad-coordinator | at file:///app/src/app.js:230:36
ad-coordinator | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
ad-coordinator | code: 'ERR_HTTP_HEADERS_SENT'
ad-coordinator | }
ad-coordinator |
ad-coordinator | Node.js v18.20.4
Essentially the error gets handled twice, with two responses.
To Reproduce
Steps to reproduce the behavior:
request an unknown statusId from /status/:statusId
Expected behavior
Should instead return a 404
The text was updated successfully, but these errors were encountered:
Describe the bug
When making a call to the workflow coordinator's '/status/:statusCredentialId' endpoint with a statusCredentialId for which there is no status list, the coordinator calls the status-service, which correctly returns a 404, which the workflow-coordinator middleware handles, but the workflow coordinator's '/status/:statusCredentialId' method still incorrectly tries to return a second response (a 500), which crashes the server with error:
Essentially the error gets handled twice, with two responses.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should instead return a 404
The text was updated successfully, but these errors were encountered: