Skip to content
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

Write default builtin error middleware that gets appended to middleware stack #2

Open
noraa-july-stoke opened this issue Apr 16, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@noraa-july-stoke
Copy link
Owner

this class needs to be used. feel free to modify the class if you come up with any ideas while you are working on this.

class TangerineError(Exception):
    def __init__(self, message, status_code):
        super().__init__(message)
        self.status_code = status_code

    def to_dict(self):
        return {
            'error': {
                'message': str(self),
                'status_code': self.status_code
            }
        }

# print(TangerineError("A stupid error", 200))
@noraa-july-stoke noraa-july-stoke added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 16, 2023
@rishav-karanjit
Copy link

Hello @noraa-july-stoke, just wanted to check if this issue is already done yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants