kennym / cf7-to-api

LOOKING FOR MAINTAINER. Wordpress plugin to transmit contact form 7 entries to remote API using POST or GET
https://wordpress.org/plugins/cf7-to-api-basic-auth/
52 stars 30 forks source link

Doesn't handle 409 response codes correctly #45

Closed kevprice closed 2 years ago

kevprice commented 3 years ago

When sending to an API it doesn't handle response codes correctly.

For example if I send a sign up request to an API and that user already exists then the API should send back a 409 conflict code.

The plugin currently displays the correct text that is returned from the API e.g.: 'The email address you have entered is already associated with another account.'

However it treats this as a success and clears the form. Rather than reading the 409 response as an error/failure and leaving the form as it is to be corrected by the user.

It would be awesome if the plugin would read error codes and react accordingly (I have only tested 409 so far)

kennym commented 2 years ago

Please, hire someone to fix this. I have no time to maintain this repo anymore. Thanks for understanding.