From 0b082549b99a4560ea657103994218f92dc3fd6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Pocrnji=C4=8D?= Date: Mon, 9 Mar 2026 06:30:49 +0100 Subject: [PATCH] fixed something --- app/Services/DecisionEvents/Registry.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Services/DecisionEvents/Registry.php b/app/Services/DecisionEvents/Registry.php index cbd0d94..0dbf14a 100644 --- a/app/Services/DecisionEvents/Registry.php +++ b/app/Services/DecisionEvents/Registry.php @@ -24,9 +24,12 @@ public static function resolve(string $key): DecisionEventHandler { $key = trim(strtolower($key)); $class = static::$map[$key] ?? null; - if (! $class || ! class_exists($class)) { + if (! $class) { throw new InvalidArgumentException("Unknown decision event handler for key: {$key}"); } + if (! class_exists($class)) { + throw new InvalidArgumentException("Handler class {$class} for key {$key} does not exist (check autoload)"); + } $handler = app($class); if (! $handler instanceof DecisionEventHandler) { throw new InvalidArgumentException("Handler for key {$key} must implement DecisionEventHandler");