File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
packages/service-library/src/servicelib/rabbitmq/rpc_interfaces/webserver Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 1- from common_library .errors_classes import (
2- OsparcErrorMixin ,
3- )
1+ from common_library .errors_classes import OsparcErrorMixin
42
3+ from ..._errors import RPCServerError
54
6- class WebServerRpcError (OsparcErrorMixin , Exception ):
7- msg_template = "{details}"
5+
6+ class WebServerRpcError (RPCServerError ):
7+ msg_template = "{domain_error_nessage} [{domain_error_type_name}]"
88
99 @classmethod
1010 def from_domain_error (cls , err : OsparcErrorMixin ):
11- return cls (details = f"{ err } [{ err .__class__ .__name__ } ]" , ** err .error_context ())
11+ return cls (
12+ # composes a message
13+ domain_error_nessage = err .message ,
14+ domain_error_type_name = f"{ err .__class__ .__name__ } " ,
15+ # copies context
16+ ** err .error_context (),
17+ )
1218
1319
1420class ProjectNotFoundRpcError (WebServerRpcError ): ...
You can’t perform that action at this time.
0 commit comments