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