Addition of Result Pattern to easily apply it in other projects #3

Merged
foefl merged 5 commits from result_pattern into main 2025-10-23 07:22:20 +00:00
Showing only changes of commit a6ffc2ebf4 - Show all commits

View File

@ -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