Response::HTTP_UNAUTHORIZED, self::SERVER_ERROR => Response::HTTP_INTERNAL_SERVER_ERROR, }; } public function message(): string { return match ($this) { self::INVALID_CREDENTIALS => 'Invalid credentials', self::SERVER_ERROR => 'Authentication failed', }; } }