Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions nomad/api/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,20 @@ class BaseNomadException(Exception):
def __init__(self, nomad_resp):
self.nomad_resp = nomad_resp

def __str__(self):
return 'The {0} was raised with following response: {1}.'.format(self.__class__.__name__, self.nomad_resp.text)


class URLNotFoundNomadException(BaseNomadException):
"""The requeted URL given does not exist"""
def __init__(self, nomad_resp):
self.nomad_resp = nomad_resp



class URLNotAuthorizedNomadException(BaseNomadException):
"""The requested URL is not authorized. ACL"""
def __init__(self, nomad_resp):
self.nomad_resp = nomad_resp


class BadRequestNomadException(BaseNomadException):
"""Validation failure and if a parameter is modified in the request, it could potentially succeed."""
def __init__(self, nomad_resp):
self.nomad_resp = nomad_resp


class InvalidParameters(Exception):
Expand Down