How to use the janus.exceptions.JanusException.__init__ function in janus

To help you get started, we’ve selected a few janus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xamoom / xamoom-janus / janus / exceptions.py View on Github external
def __init__(self, detail=None, code=-1, meta = None):
        JanusException. __init__(self,
            title="The web server was unable to understand the request and process it.",
            detail=detail,
            status=400,
            code=code,
            meta=meta)
github xamoom / xamoom-janus / janus / exceptions.py View on Github external
def  __init__(self, detail=None, code=-1, meta = None):
        #just call super with some prefilled information fitting this special type of exception
        JanusException. __init__(self,
            title="The request can not be process, because authorization is missing.",
            detail=detail,
            status=401,
            code=code,
            meta=meta)
github xamoom / xamoom-janus / janus / exceptions.py View on Github external
def  __init__(self, title="Developer Error", detail=None, code=-1, meta = None, status = 500):
        #just call super with some prefilled information fitting this special type of exception
        JanusException. __init__(self,
            title=title,
            detail=detail,
            status=500,
            code=code,
            meta=meta)
github xamoom / xamoom-janus / janus / exceptions.py View on Github external
def  __init__(self, detail=None, meta = None):
        #just call super with some prefilled information fitting this special type of exception
        JanusException. __init__(self,
            title="Internal Server Error",
            detail=detail,
            status=500,
            code="42", #this is always error 42, because this should never happen on production.
            meta=meta)
github xamoom / xamoom-janus / janus / exceptions.py View on Github external
def  __init__(self, detail=None, code=-1, meta = None):
        #just call super with some prefilled information fitting this special type of exception
        JanusException. __init__(self,
            title="The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.",
            detail=detail,
            status=404,
            code=code,
            meta=meta)
github xamoom / xamoom-janus / janus / exceptions.py View on Github external
def  __init__(self, detail=None, code=-1, meta = None):
        #just call super with some prefilled information fitting this special type of exception
        JanusException. __init__(self,
            title="You are not allowed to access this resource.",
            detail=detail,
            status=403,
            code=code,
            meta=meta)