79741330

Date: 2025-08-20 16:15:27
Score: 1
Natty:
Report link

In your example, it will not stop executing on the first reply. Meaning that your code will continue through the rest of the function which @dave-newton mentioned in their comment. The docs they show it is not necessary, so I think the correct way to structure it is like this:

if (!transaction) {
    return rep.code(204).send({ message: 'No previously used bank found' })
}

rep.code(200).send(transaction) // don't send if equals !transaction
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @dave-newton
  • Low reputation (0.5):
Posted by: BBQ Singular