52 lines
1.1 KiB
Python
52 lines
1.1 KiB
Python
from werkzeug.exceptions import HTTPException
|
|
|
|
|
|
class EAMHTTPException(HTTPException):
|
|
code = None
|
|
eam_description = None
|
|
|
|
|
|
class InvalidUpstream(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "Upstream URL invalid"
|
|
|
|
|
|
class UpstreamFailed(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "Upstream request failed"
|
|
|
|
|
|
class UnknownCompression(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "Unknown compression type"
|
|
|
|
|
|
class InvalidPacket(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "Invalid XML packet"
|
|
|
|
|
|
class InvalidModel(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "Invalid model"
|
|
|
|
|
|
class ModelMissmatch(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "Model missmatched"
|
|
|
|
|
|
class ModuleMethodMissing(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "Module or method missing"
|
|
|
|
|
|
class CallNodeMissing(EAMHTTPException):
|
|
code = 400
|
|
eam_description = "<call> node missing"
|
|
|
|
|
|
class NoMethodHandler(EAMHTTPException):
|
|
code = 404
|
|
eam_description = "No handler found for module/method"
|