-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add api exception mode #1
Comments
This is how a solution could look like for python: class DsfException(Exception):
"""Base class for all DSF exceptions"""
def __init__(self, message):
super().__init__(message)
class InternalServerException(DsfException):
"""Exception returned by the server for an arbitrary problem"""
def __init__(self):
super().__init__("Internal Server Exception")
class ErrorResponseException(DsfException):
"""Exception returned if an Error Response is received"""
def __init__(self, error_type: str, error_message: str):
super().__init__("{}: {}".format(error_type, error_message)) This is an incomplete overview of found errors
|
var ErrSomeDecriptiveName = errors.New("error message")
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To improve programming experience the error handling should use native language features. In python this are exceptions.
Clarification is needed here for go language as well.
As many errors can be thrown and should shown as easy and clear as possible to the programmer/user most errors should be mapped to exceptions. Here is more specification needed.
The text was updated successfully, but these errors were encountered: