File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ class UnknownRecError(Exception):
26
26
27
27
@dataclass
28
28
class ErrorGridResponseError (Exception ):
29
- help_msg : str
29
+ response : Grid
30
30
31
31
32
32
@dataclass
33
33
class IncompleteDataResponseError (Exception ):
34
- help_msg : str
34
+ response : Grid
35
35
36
36
37
37
class Client :
@@ -674,7 +674,7 @@ def _call(
674
674
headers = headers ,
675
675
context = self ._context ,
676
676
)
677
- _validate_response_meta (response . meta )
677
+ _validate_response_meta (response )
678
678
679
679
return response
680
680
@@ -704,18 +704,14 @@ def _validate_his_write_parameters(
704
704
)
705
705
706
706
707
- def _validate_response_meta (meta : dict [str , Any ]):
707
+ def _validate_response_meta (response : Grid ):
708
+
709
+ meta = response .meta
708
710
if "err" in meta .keys ():
709
- error_dis = meta ["dis" ]
710
- raise ErrorGridResponseError (
711
- "The server returned an error grid with this message:\n " + error_dis
712
- )
711
+ raise ErrorGridResponseError (response )
713
712
714
713
if "incomplete" in meta .keys ():
715
- incomplete_dis = meta ["incomplete" ]
716
- raise IncompleteDataResponseError (
717
- "Incomplete data was returned for these reasons:" f"\n { incomplete_dis } "
718
- )
714
+ raise IncompleteDataResponseError (response )
719
715
720
716
721
717
def _create_his_read_req_data (
You can’t perform that action at this time.
0 commit comments