Skip to main content

Exceptions for Gizwits PaaS

Project description

It's Exception lib for Gizwits PaaS Usage.

How to use


python >= 3 for now.


pip install giz-exceptions

config in

base on Django REST Framework

    'EXCEPTION_HANDLER': 'giz_exceptions.handler.custom_handler'


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.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View
Filename, size giz_exceptions-0.0.8-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page