Skip to content
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

Merged
merged 7 commits into from
Jul 18, 2020
Merged

Conversation

jorganisak
Copy link
Contributor

@jorganisak jorganisak commented Jul 3, 2020

Needs crownheightsaid/airtable-change-detector#14 to work

crownheightsaid/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 work

  • Passes errFunc as arg to pollWithInterval
  • Sends error.stack to wg_tech
  • Doesn't send if the same error has been sent within 2 hours (internal memory, error history won't survive app restart)

#90

@mjmaurer
Copy link
Contributor

mjmaurer commented Jul 7, 2020

action item here is to move to the current errorFunc api

@jorganisak
Copy link
Contributor Author

@mjmaurer - I think this uses the current api, (passing errFunc as 4th arg to pollWithInterval) But I could be missing something..

@jorganisak
Copy link
Contributor Author

Updated PR description for clarity

Copy link
Contributor

@mjmaurer mjmaurer left a 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);
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants