gfw-api/gs-pro-config

View on GitHub
proconfig/errors.py

Summary

Maintainability
A
0 mins
Test Coverage
B
83%
"""ERRORS"""


class Error(Exception):

    def __init__(self, message, code):
        self.message = message
        self.code = code

    @property
    def serialize(self):
        return {
            'message': self.message,
            'code': self.code
        }