cf7-to-api icon indicating copy to clipboard operation
cf7-to-api copied to clipboard

Handle API errors

Open jamescremona-highlight opened this issue 5 years ago • 7 comments
trafficstars

Currently, if the form is filled up properly but an error occurs at the API side, the form still shows a 'success' message. Would be nice to be able to show the server error on the form if the API call fails.

jamescremona-highlight avatar Jul 29 '20 06:07 jamescremona-highlight

In the contactform setting under

  • DEBUG LOG ( View last transmission attempt ) - there is a field with "Remote server result:"

Is this what you are looking for?

chrisolesen avatar Jul 29 '20 06:07 chrisolesen

In the contactform setting under

  • DEBUG LOG ( View last transmission attempt ) - there is a field with "Remote server result:"

Is this what you are looking for?

No, what I was thinking is to show the user (on the front-end side) that an error occurred at the API side

As an example, if the API replies with a "500: internal server error", the form on Front End would show "Internal server error"

jamescremona-highlight avatar Jul 29 '20 07:07 jamescremona-highlight

Hi @kennym, do you have any plans to address this issue? Your solution is perfect for my use case except for this detail. I'd love to contribute but PHP is not really amongst my prefered programming languages so I don't know even where to start.

RafaelMiquelino avatar Oct 05 '20 17:10 RafaelMiquelino

Thanks!

RafaelMiquelino avatar Oct 05 '20 17:10 RafaelMiquelino

@RafaelMiquelino this will be in the next release.

Bump! Wondering if this was released?

MohammadShahdad avatar Apr 05 '21 15:04 MohammadShahdad

Great plugin, but sis this possible yet? Would really make the plugin more usefull in a lot of cases.

mooksz avatar Jun 24 '21 15:06 mooksz