Skip to main content

Exceptions for Gizwits PaaS

Project description

It's Exception lib for Gizwits PaaS Usage.

How to use

requirement

python >= 3 for now.

install

pip install giz-exceptions

config in settings.py

base on Django REST Framework

REST_FRAMEWORK = {
    'EXCEPTION_HANDLER': 'giz_exceptions.handler.custom_handler'
}

usage

from rest_framework.views import APIView
from giz_exceptions.paas import exceptions


class MyView(APIView):
    def get(self, request, *args, **kwargs):
        ...
        if not self.request.condition:
            raise exceptions.ProductKeyInvalid
            # or with detail message
            # raise exceptions.ProductKeyInvalid('This required product key')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for giz-exceptions, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size giz_exceptions-0.0.8-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size giz_exceptions-0.0.8.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page