Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle API errors #21

Open
jamescremona-highlight opened this issue Jul 29, 2020 · 7 comments · May be fixed by #62
Open

Handle API errors #21

jamescremona-highlight opened this issue Jul 29, 2020 · 7 comments · May be fixed by #62
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jamescremona-highlight
Copy link

jamescremona-highlight commented Jul 29, 2020

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.

@chrisolesen
Copy link
Contributor

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?

@jamescremona-highlight
Copy link
Author

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"

@RafaelMiquelino
Copy link

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.

@kennym kennym self-assigned this Oct 5, 2020
@kennym kennym added enhancement New feature or request good first issue Good for newcomers labels Oct 5, 2020
@kennym kennym pinned this issue Oct 5, 2020
@RafaelMiquelino
Copy link

Thanks!

@MohammadShahdad
Copy link

@RafaelMiquelino this will be in the next release.

Bump! Wondering if this was released?

@mooksz
Copy link

mooksz commented Jun 24, 2021

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

Repository owner deleted a comment from tobarbaro Feb 10, 2024
Repository owner deleted a comment from Yucao-cy Feb 23, 2024
Repository owner deleted a comment from D-inspiration Feb 23, 2024
Repository owner deleted a comment from D-inspiration Feb 23, 2024
Repository owner deleted a comment from tim-tepia Mar 18, 2024
@github-staff github-staff deleted a comment from Chicook Apr 11, 2024
@lpla
Copy link

lpla commented Sep 2, 2024

I implemented this workaround for the API error codes to be treated as CF7 errors, so that colors match the message type and form doesn't get wiped if API response had any error: #62

@github-staff github-staff deleted a comment from vokaplok Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants