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

[Question] Handling API errors in finishers #984

Open
cweiske opened this issue Mar 1, 2024 · 0 comments
Open

[Question] Handling API errors in finishers #984

cweiske opened this issue Mar 1, 2024 · 0 comments

Comments

@cweiske
Copy link
Contributor

cweiske commented Mar 1, 2024

My custom finisher class sends data to an external API, which can fail. In that case I would like to notify the user about that and allow him to re-submit the form to try it again (like a validation error).

How can I do that with powermail 12.1.1?

Validation happens in FormController::checkCreateAction, which internally forwards to ::createAction when all data are valid.
Return values of finishers in createAction are not used.

Powermail's own SendParametersFinisher does not check the return value, so it can't be used as example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant