Addition of Result Pattern to easily apply it in other projects #3
@ -15,22 +15,6 @@ class WAccessResultDespiteError(Exception):
|
|||||||
there was an error in the underlying procedure"""
|
there was an error in the underlying procedure"""
|
||||||
|
|
||||||
|
|
||||||
# ** Exceptions for unwrap of error value
|
|
||||||
class UDataProcessingError(Exception):
|
|
||||||
"""unwrap exception: all data related errors (e.g. wrong format, non-sufficient quality)"""
|
|
||||||
|
|
||||||
|
|
||||||
class UInternalError(Exception):
|
|
||||||
"""unwrap exception: all internal errors; internal, if error is not caused by (external)
|
|
||||||
data related issues"""
|
|
||||||
|
|
||||||
|
|
||||||
class UApiError(Exception):
|
|
||||||
"""unwrap exception: all errors occurred on the server side of Delta Barth's API
|
|
||||||
default case: should not be raised, as this kind of errors should be handled by
|
|
||||||
Delta Barth themselves"""
|
|
||||||
|
|
||||||
|
|
||||||
@dc.dataclass(kw_only=True, slots=True)
|
@dc.dataclass(kw_only=True, slots=True)
|
||||||
class Status:
|
class Status:
|
||||||
code: int
|
code: int
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user