SamsResourceErrors – Resource Errors

class ValidationError(errors: Dict[str, str])

Raised when receiving an invalid request to create or update a resource

The response will include the list of fields and rules that failed validation, under the errors attribute. For example:

"error": "04001",
"name": "ValidationError",
"description": "Validation error",
"errors": {
    "name": ["required"]
}

This indicates that the field name was not supplied with the request (or was null).

app_code: str = '04001'
http_code: int = 400
errors: Dict[str, List[str]] = {}
class InvalidSearchQuery(payload: Optional[Dict[str, Any]] = None, exception: Optional[Exception] = None)

Raised when an invalid ElasticSearch query was received

app_code: str = '04002'
description: str = 'Invalid search query'
http_code: int = 400
log_exception: bool = True
class AuthNotSupplied(payload: Optional[Dict[str, Any]] = None, exception: Optional[Exception] = None)

Raised when authentication failed

app_code: str = '04003'
description: str = 'Please provide proper credentials'
http_code: int = 401