Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def build_headers(self, headers):
headers = headers or {}
if not self.api_key: # FIXME: we currently allow Users to be created without an api_key. do we want to continue allowing that?
raise NoApiKeyError()
return {**self.default_headers, **headers}
def __init__(self, message=''):
super(NoApiKeyError, self).__init__(message or self.message)