Source code for nboost.exceptions

"""NBoost base exceptions"""


[docs]class RequestException(Exception): """Exception when receiving client request"""
[docs]class ResponseException(Exception): """Upstream response contains error message"""
[docs]class UpstreamConnectionError(Exception): """Raised when the upstream host refuses connection"""
[docs]class StatusRequest(RequestException): """Client sent status request"""
[docs]class FrontendRequest(RequestException): """Client sent frontend request"""
[docs]class UnknownRequest(RequestException): """Unrecognized url path in request"""
[docs]class MissingQuery(RequestException): """Could not parse query in request"""
[docs]class UpstreamServerError(ResponseException): """Raised when the upstream server sends an error status code."""
[docs]class InvalidChoices(ResponseException): """The length of choices, choice ids, and choice values must be the same"""