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:
|
} catch (updateErr) { |
|
await session.abortTransaction() |
|
throw updateErr |
|
} catch (rejectErr) { |
|
await session.abortTransaction() |
|
throw rejectErr |
This file does not use a pattern such as:
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
cve-services/src/controller/review-object.controller/review-object.controller.js
Lines 186 to 188 in 69b2859