Skip to content

Better Error reporting: Pass through Mailchimp errors to FE #90

@MaxwellGarceau

Description

@MaxwellGarceau

Is your enhancement related to a problem? Please describe.

Problem

Currently, Mailchimp errors will not be displayed on the FE. It is assumed that if a request is not a 200 response and there are no errors in the body that the email address is invalid.

However, I ran into a 400 error while testing because "max.garceau+phonenumberinvalid@10up.com has signed up to a lot of lists very recently; we're not allowing more signups for now".

This error was not visible on the FE. If a user ran into a different 4** error related to Mailchimp anti-spam (or another limit) it would be a bad user experience.

Response from Mailchimp API

Summarized_Log_Entry.txt
Raw_Log_Output.txt

Solution

Admin View (could also show a logged out user)

  • Update the error message check to also check for $body['detail'] and display the detail property as an error message if exists.
  • Double check Mailchimp API docs to ensure that error messages are not transmitted via another property on the response

User View

  • Give a generalized error message that lets a user know their subscription was not successful.
    • Maybe pull in the contact information from Settings > General > Administration Email Address?

Designs

No response

Describe alternatives you've considered

Another solution would be to generalize the catch all email validation. For example, "Email Address: Please fill out a valid email address, choose another email address, or wait a little bit before your next submission".

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions