Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Substitutions allow non-strings for values #232

Copy link
Copy link

Description

@tylerreinhart
Issue body actions

Issue Summary

API only allows strings for substitution values. This library will allow substitutions of non-strings and will fail on send attempt.

Steps to Reproduce

  1. message = Mail()
  2. personalization = Personalization()
  3. personalization.add_to(Email('test@email.com'))
  4. personalization.add_substitution(Substitution('-test-, 1))
  5. message.add_personalization(personalization)
  6. sg.client.mail.send.post(request_body=message.get()) 400 returned because of int in substitution json

Should an error be thrown when attempting to create a non-string substitution?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.