Skip to content

Error message mentions API key even if using access token #49

@dkotter

Description

@dkotter

Describe the bug

This is a minor thing but noticed that if you connect via the new OAuth flow but then the access token becomes invalid for some reason, we show an error message on the settings page (different from the error admin notice).

This error message says the API key may be invalid, even if someone isn't using an API key at all (which will be the case for all new users once the OAuth feature ships).

Would be great to update that error message, either making it more generic (something like authentication failed instead of mentioning API key or access token) or modify the error message depending on if someone has an API key or access token set.

Steps to Reproduce

  1. Authenticate via the new OAuth flow
  2. In the database, modify the mailchimp_sf_access_token value to make it invalid
  3. Refresh the settings page to see the error message

Screenshots, screen recording, code snippet

Error message

Environment information

No response

WordPress information

No response

Code of Conduct

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions