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

Bugfix: Change "enabled" to "enable" to conform to SendGrid API. #624

Merged
merged 1 commit into from
Aug 27, 2021

Conversation

danadaldos
Copy link
Contributor

@danadaldos danadaldos commented Aug 23, 2021

Problem

A recent PR added click tracking support for the SendGrid adapter. Unfortunately, we didn't catch a typo that sends "enabled" as the param instead of "enable" as is recognized by the API. This results in the following error:

"{\"errors\":[{\"message\":\"The click_tracking enable parameter is required.\",\"field\":\"tracking_settings.click_tracking.enable\",\"help\":\"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.tracking_settings.click_tracking.enable\"}]}"

with these params:

"tracking_settings" => %{"click_tracking" => %{"enable_text" => false, "enabled" => false}

Where it says "enabled" => false in the params, it should say "enable" => false

Solution

Fix the typo and update the tests.

@danadaldos
Copy link
Contributor Author

@sreecodeslayer Please give this a review when you get a chance as it may also be affecting your applications.

@danadaldos danadaldos changed the title Bugfix: Change "enabled" to "enable" to conform to Sendgrid API. Bugfix: Change "enabled" to "enable" to conform to SendGrid API. Aug 23, 2021
@sreecodeslayer
Copy link
Contributor

What 🤔
Well that is interesting, seems like the doc here is then outdated or mistyped 😄
This one here says its supposed to be enabled : https://sendgrid.api-docs.io/v3.0/settings-tracking/settings-click-tracking

@danadaldos
Copy link
Contributor Author

danadaldos commented Aug 23, 2021

@sreecodeslayer Yeah, that is weird, on the official docs it's definitely enable. Looks like the docs hosted on api-docs.io are inaccurate.

image

@danadaldos
Copy link
Contributor Author

@germsvel - I hate to "at" you again here, but would you be willing to merge this fix?

Copy link
Collaborator

@germsvel germsvel left a comment

Choose a reason for hiding this comment

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

🥳 thanks for catching this and fixing it!

@germsvel germsvel merged commit 09c8eae into beam-community:master Aug 27, 2021
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.

4 participants