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

Fetch image immediately before presenting/sending #4

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Conversation

stuartpb
Copy link
Owner

@stuartpb stuartpb commented Mar 6, 2024

Closes #1 with a slightly more modern approach that also prefetches the image before emailing it from the sentinel.

The only marginally-significant loss between that PR and this one is that I decided the HTTPResponseError class was overkill over just throwing a new Error. If I ever refactor this project to be more of a Service-Weaver-esque monolith, I might reintroduce that as art of a lightweight internal module (ie. as the error thrown by a wrapper around fetch if the status is not 200).

@stuartpb stuartpb merged commit 92a2a4d into main Mar 6, 2024
@stuartpb stuartpb deleted the prefetch branch March 6, 2024 21:34
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.

1 participant