Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import logging
import requests
import json
class _NullHandler(logging.Handler):
def emit(self, record):
pass
logger = logging.getLogger(__name__)
logger.addHandler(_NullHandler())
class ZabbixAPIException(Exception):
""" generic zabbix api exception
code list:
-32700 - invalid JSON. An error occurred on the server while parsing the JSON text (typo, wrong quotes, etc.)
-32600 - received JSON is not a valid JSON-RPC Request
-32601 - requested remote-procedure does not exist
-32602 - invalid method parameters
-32603 - Internal JSON-RPC error
-32400 - System error
-32300 - Transport error
-32500 - Application error
"""
pass