fix(order): Better error handling in use-case

This commit is contained in:
Chris Troutner
2022-05-03 15:33:33 -07:00
parent 1476500c61
commit 5be3c92a29
+1 -1
View File
@@ -198,7 +198,7 @@ class OrderLib {
// console.log('utxoStatus: ', utxoStatus)
} catch (err) {
// Handle corner case of bad-data in the Order model.
if (err.message.includes('txid needs to be a proper transaction ID')) {
if (err.message & err.message.includes('txid needs to be a proper transaction ID')) {
console.log(`Deleting Order with bad data: ${JSON.stringify(thisOrder, null, 2)}`)
await thisOrder.remove()
continue