-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add logging, outgoing payment service changes #2419
Conversation
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
return payment | ||
} | ||
|
||
function validateSentAmount( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
standardize the error here
@@ -276,18 +278,14 @@ async function validateGrant( | |||
return false | |||
} | |||
|
|||
// Lock grant | |||
// TODO: update to use objection once it supports forNoKeyUpdate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using objection now
@@ -3,7 +3,12 @@ import { Logger } from 'pino' | |||
import { ReadContext, CreateContext, ListContext } from '../../../app' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just logging & more gracefully handling 500 errors
{ | ||
...deps, | ||
knex: trx | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicitly passing in trx
now instead of "mutating" deps.knex
) | ||
if (totalSent === undefined) { | ||
throw new Error() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a few of these throw new Error()
, so trying to get rid of them slowly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! LGTM!
Changes proposed in this pull request
Some minor refactoring around outgoing payments: standardising logging, updating functions & adding tests.
Context
Mostly to improve our logging & error handling + checking off a TODO item in the code.
Checklist
fixes #number