From 3418fedfcfb922d779159f921e4cf1d0fa7ef134 Mon Sep 17 00:00:00 2001 From: Torben Dannhauer Date: Mon, 26 Oct 2026 23:48:46 +0100 Subject: [PATCH] feat(exception): add InvalidDataThrowable marker interface Marks exceptions caused by invalid data supplied by the caller (as opposed to a failure of the server), so consumers such as protocol handlers can tell "do not retry this item" from "try again later" without depending on the concrete exception classes of an application. Same pattern as PermissionDeniedThrowable. First implementer is Turba_Exception_InvalidAttribute (horde/turba#73). --- src/InvalidDataThrowable.php | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/InvalidDataThrowable.php diff --git a/src/InvalidDataThrowable.php b/src/InvalidDataThrowable.php new file mode 100644 index 00000000..0cb8c9f0 --- /dev/null +++ b/src/InvalidDataThrowable.php @@ -0,0 +1,38 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 + * @package Exception + */ + +namespace Horde\Exception; + +/** + * Marker interface for exceptions caused by invalid caller-supplied data. + * + * Thrown by an application when a value it was asked to store or process + * violates that application's own constraints (field length, format, + * required field) - as opposed to an infrastructure failure. Consumers + * such as sync protocol handlers use it to tell "the item is unacceptable, + * do not retry it" from "the server failed, try again later" without + * depending on the throwing application's exception classes. + * + * Intentionally a noop / marker interface, like PermissionDeniedThrowable. + * + * @author Torben Dannhauer + * @category Horde + * @copyright 2026 The Horde Project + * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 + * @package Exception + */ +interface InvalidDataThrowable extends HordeThrowable +{ +}