-
Notifications
You must be signed in to change notification settings - Fork 17
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
Send error notification to slack #108
Conversation
action item here is to move to the current errorFunc api |
@mjmaurer - I think this uses the current api, (passing errFunc as 4th arg to |
Updated PR description for clarity |
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.
lol yr right, I got confused.
thanks looks great! feel free to merge after you fix the nit (or not)
const newExternalDonorPayment = require("./actions/payments/newExternalDonorPayment"); | ||
const newPaymentRequest = require("./actions/payments/newPaymentRequest"); | ||
const updateReimbursementMessage = require("./actions/payments/updateReimbursementStatus"); | ||
|
||
const defaultInterval = 10000; | ||
|
||
const errFunc = (error) => { | ||
sendErrorNotification(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.
optional nit: can you make the function async and await the sendError? functionally the same, but a bit more resistant to a potential weird future change-detector update
Needs crownheightsaid/airtable-change-detector#14 to workcrownheightsaid/airtable-change-detector#14 enhances current errFunc api to also catch errors within the passed function from the caller of
pollWithInterval
, but not necessary for this to workpollWithInterval
error.stack
towg_tech
#90