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

Add a try/except around the code to get the files. #2760

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

servingUpAces
Copy link
Contributor

The idea is to log the exception but keep going. That way the "good" files still get sent and we can investigate why a file failed.

The idea is to log the exception but keep going. That way the "good" files still get sent and we can investigate why a file failed.
call(current_app.config['LETTERS_PDF_BUCKET_NAME'], '2020-02-17/NOTIFY.REF1.D.2.C.C.20200217150000.PDF'),
call(current_app.config['LETTERS_PDF_BUCKET_NAME'], '2020-02-17/NOTIFY.REF0.D.2.C.C.20200217160000.PDF'),
]
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to also assert our log message for the error case but we can let that slide for the moment given time

@servingUpAces servingUpAces merged commit 67339d7 into master Mar 19, 2020
@servingUpAces servingUpAces deleted the add-try-catch branch March 19, 2020 09:28
leohemsted added a commit that referenced this pull request Mar 16, 2023
otherwise we'll just do nothing until the next day, when we'll try and
send it again. i think the chance of it appearing in s3 overnight feels
slim to unlikely - this was behaviour we added three years ago[^1] but
i'm not sure i remember us ever receiving these log messages.

[^1]: #2760
leohemsted added a commit that referenced this pull request Mar 16, 2023
otherwise we'll just do nothing until the next day, when we'll try and
send it again. i think the chance of it appearing in s3 overnight feels
slim to unlikely - this was behaviour we added three years ago[^1] but
i'm not sure i remember us ever receiving these log messages.

[^1]: #2760
leohemsted added a commit that referenced this pull request Mar 16, 2023
otherwise we'll just do nothing until the next day, when we'll try and
send it again. i think the chance of it appearing in s3 overnight feels
slim to unlikely - this was behaviour we added three years ago[^1] but
the log message never fired due to a bug in how the function was called.
it feels safer and more correct to set the letter to technical-failure.
we'll get a proper exception log and it'll be easier to distinguish
failed letters in technical-failure that we need to action from new
letters in created that will go out as normal

[^1]: #2760
leohemsted added a commit that referenced this pull request Mar 17, 2023
otherwise we'll just do nothing until the next day, when we'll try and
send it again. i think the chance of it appearing in s3 overnight feels
slim to unlikely - this was behaviour we added three years ago[^1] but
the log message never fired due to a bug in how the function was called.
it feels safer and more correct to set the letter to technical-failure.
we'll get a proper exception log and it'll be easier to distinguish
failed letters in technical-failure that we need to action from new
letters in created that will go out as normal

[^1]: #2760
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