coyote-team / coyote-wp

Wordpress Plug-in for Coyote
2 stars 2 forks source link

Check for invalid role alert to display message when profile is null #111

Closed Pen-a11y closed 2 years ago

Pen-a11y commented 2 years ago

When a profile is searched for with a new endpoint the first time that the profile is fetched an error is given and the profile is null, which leads to the transient being created, and allowing for the alert that the endpoint or token is invalid. Due to this adding a check in the action to ensure that the profile is truly invalid before displaying the alert stops this false negative from occurring. This fixes #110 .

The error given is as follows: GetProfileRequest.ERROR: Error fetching profile: Invalid Coyote API response for https://staging.coyote.pics/api/v1/profile/, status 401 {"class":"Coyote\\Request\\GetProfileRequest"}

jkva commented 2 years ago

Closing as superseded by #126.