From 1f66fef3c88af53c722b8ccde7d5ec05096f679f Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Fri, 8 May 2026 01:59:32 +0200 Subject: [PATCH] feat(form-builder): FormBindingExceptionClassifier helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per RFC-WS-6 §Q3 v1.3 addition 2. Centralises the Throwable -> failure_response_code mapping so the listener (ApplyBindingsOnFormSubmit::handle catch block) and the retry-service (FormFailureRetryService::recordFailure) produce identical classifications. Single behaviour-change point. Resolution order: FormBindingApplicatorException subclass dispatch via reasonCode(); fallback 'unknown_error' for anything outside the hierarchy. Wiring into the listener and the retry service lands in D2. Co-Authored-By: Claude Opus 4.7 --- .../FormBindingExceptionClassifier.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 api/app/FormBuilder/Bindings/FormBindingExceptionClassifier.php diff --git a/api/app/FormBuilder/Bindings/FormBindingExceptionClassifier.php b/api/app/FormBuilder/Bindings/FormBindingExceptionClassifier.php new file mode 100644 index 00000000..36d2f04f --- /dev/null +++ b/api/app/FormBuilder/Bindings/FormBindingExceptionClassifier.php @@ -0,0 +1,39 @@ +reasonCode(); + } + + return 'unknown_error'; + } +}