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

helpers.Mail: warn on incorrect invocation #559

Closed
wants to merge 1 commit into from
Closed

helpers.Mail: warn on incorrect invocation #559

wants to merge 1 commit into from

Conversation

mdornseif
Copy link

@mdornseif mdornseif commented Feb 26, 2018

Invocations like Mail(from_email=Email('express@example.com'), subject=subject, to_email=Email(to)) silently discard all parameters. Took me several hours to debug this. I'm not sure why the library is designed that way. But I thought it would be nice to warn the caller if parameters are discarded.

Fixes

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

If you have questions, please send an email to Sendgrid, or file a Github Issue in this repository.

Invocations like `Mail(from_email=Email('express@example.com'), subject=subject, to_email=Email(to))` silently discard all parameters. Took me several hours to debug this. I'm not sure why the library is designed that way. But I thought it would be nice to warn the caller if parameters are discarded.
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Feb 26, 2018
@SendGridDX
Copy link

SendGridDX commented Feb 26, 2018

CLA assistant check
All committers have signed the CLA.

@thinkingserious
Copy link
Contributor

Thank you @mdornseif!

I have added this to our backlog for a code review.

With Best Regards,

Elmer

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap difficulty: medium fix is medium in difficulty labels Feb 27, 2018
@0bsearch
Copy link
Contributor

This will be obsolete after merging #554

@thinkingserious
Copy link
Contributor

That is true @3lnc, thanks for the heads up.

We still appreciate your contribution @mdornseif and would like to offer you some swag.

With Best Regards,

Elmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: code review request requesting a community code review or review from Twilio type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants