From 956c4c30ea1e40935e30f2f687f1ac74d271d6e2 Mon Sep 17 00:00:00 2001 From: profitroll Date: Sun, 15 Sep 2024 00:55:16 +0200 Subject: [PATCH] Added handling for SVC_PARAM error --- src/pyrmv/utility/find_exception.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pyrmv/utility/find_exception.py b/src/pyrmv/utility/find_exception.py index 8917bd4..23e4247 100644 --- a/src/pyrmv/utility/find_exception.py +++ b/src/pyrmv/utility/find_exception.py @@ -26,6 +26,7 @@ from ..errors import ( SvcNoResultError, SvcProductError, SvcSearchError, + SvcParamError, UnknownError, ) @@ -86,6 +87,9 @@ def find_exception(data: dict): elif data["errorCode"] == "SVC_CTX": raise SvcContextError() + elif data["errorCode"] == "SVC_PARAM": + raise SvcParamError(errorCode=data["errorCode"], errorText=data["errorText"]) + elif data["errorCode"] == "SVC_NO_RESULT": raise SvcNoResultError()