Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Prevent TypeError from null TextBody when pulling templates #69

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

derekrushforth
Copy link
Contributor

@derekrushforth derekrushforth commented Feb 13, 2023

Hey @tomek-ac,

On some templates, Postmark's API returns a null value on the TextBody if there's no content. It should return an empty string, so I'll report this to the backend team. This occasionally causes a type error when running postmark templates pull, so I've updated the conditional here to check this before saving the text version.

Related: #48

Occasionally Postmark’s API returns  a `null` value on a template’s TextBody. This checks for that before saving the text version and prevents an error from happening.
@derekrushforth derekrushforth self-assigned this Feb 13, 2023
Copy link
Contributor

@tomek-ac tomek-ac left a comment

Choose a reason for hiding this comment

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

lgtm. thanks @derekrushforth!

@derekrushforth derekrushforth merged commit d189732 into main Feb 14, 2023
@derekrushforth derekrushforth deleted the bug/template-pull-txt-null branch February 14, 2023 14:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants