only assume insufficient funds in paid action if the error says so

This commit is contained in:
keyan 2024-07-03 09:09:05 -05:00
parent 2dd96f4b83
commit 1a3785a865
1 changed files with 2 additions and 2 deletions

View File

@ -58,8 +58,8 @@ export default async function performPaidAction (actionType, args, context) {
} catch (e) { } catch (e) {
console.error('fee credit action failed', e) console.error('fee credit action failed', e)
// if we fail to do the action with fee credits, but the cost is 0, we should bail // if we fail with fee credits, but not because of insufficient funds, bail
if (context.cost === 0n) { if (!e.message.includes('\\"users\\" violates check constraint \\"msats_positive\\"')) {
throw e throw e
} }