-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
This file does not use a pattern such as:
catch (err) {
next(err)
}
Code that has an await of a "repo." function call can throw if, for example, a Mongoose operation fails. In most configurations of Express 4.x with Node 15 and later, this terminates the process.
In two situations, there is an explicit re-throw but other functions are affected as well:
cve-services/src/controller/review-object.controller/review-object.controller.js
Lines 98 to 100 in 69b2859
| } catch (updateErr) { | |
| await session.abortTransaction() | |
| throw updateErr |
cve-services/src/controller/review-object.controller/review-object.controller.js
Lines 186 to 188 in 69b2859
| } catch (rejectErr) { | |
| await session.abortTransaction() | |
| throw rejectErr |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Needs Triage
Status
In Review