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
{{ message }}
This repository has been archived by the owner on May 28, 2023. It is now read-only.
With the changes introduced in #390, the catalog API middleware became async. While this works generally fine, it breaks the default express error handling - instead of invoking the next error handler, this will only cause an UnhandledPromiseRejectionWarning, and cause the request to hang and never return an error.
This can be reproduced e.g. by calling /api/catalog/anindexthatdoesnotexist/product/_search.
With the changes introduced in #390, the catalog API middleware became
async
. While this works generally fine, it breaks the default express error handling - instead of invoking the next error handler, this will only cause anUnhandledPromiseRejectionWarning
, and cause the request to hang and never return an error.This can be reproduced e.g. by calling
/api/catalog/anindexthatdoesnotexist/product/_search
.Wrapping the async middleware in an error handler would be required here - either custom built or using something like https://www.npmjs.com/package/express-async-handler.
The text was updated successfully, but these errors were encountered: