esgf_core_utils.models.exceptions ================================= .. py:module:: esgf_core_utils.models.exceptions Exceptions ---------- .. autoapisummary:: esgf_core_utils.models.exceptions.MissingPermissionException esgf_core_utils.models.exceptions.OperationNotPermittedException esgf_core_utils.models.exceptions.UnexpectedExtensionException esgf_core_utils.models.exceptions.ExpectedExtensionsMissingException esgf_core_utils.models.exceptions.RFC9457Exception esgf_core_utils.models.exceptions.STACValidationException esgf_core_utils.models.exceptions.AuthorizationException esgf_core_utils.models.exceptions.ItemAlreadyExistsException esgf_core_utils.models.exceptions.ItemDoesNotExistException esgf_core_utils.models.exceptions.UnknownException Package Contents ---------------- .. py:exception:: MissingPermissionException(permission_type: str, target: str, role: str = '') Bases: :py:obj:`Exception` Missing Permission Exception .. py:attribute:: type .. py:attribute:: role :value: '' .. py:attribute:: target .. py:exception:: OperationNotPermittedException(op: str) Bases: :py:obj:`Exception` Operation not permitted Exception .. py:attribute:: status_code :value: 400 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/operation-not-permitted' .. py:attribute:: title :value: 'The operation you attempted is not permitted' .. py:attribute:: detail .. py:exception:: UnexpectedExtensionException(extension: str) Bases: :py:obj:`Exception` Unexpected extenison Exception .. py:attribute:: status_code :value: 400 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/unexpected-extension' .. py:attribute:: title :value: 'There is an unexpected extension in your request' .. py:attribute:: detail .. py:exception:: ExpectedExtensionsMissingException(extensions: list[str]) Bases: :py:obj:`Exception` Expected extension missing Exception .. py:attribute:: status_code :value: 400 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/expected-extension-missing' .. py:attribute:: title :value: 'A required extension is missing from your request' .. py:attribute:: detail :value: 'Your request is missing required extensions: `[]` -- please add this extenison and try again.' .. py:exception:: RFC9457Exception Bases: :py:obj:`Exception` RFC 9457 Exception .. py:attribute:: status_code :type: int .. py:attribute:: type :type: str .. py:attribute:: title :type: str .. py:attribute:: detail :type: str .. py:attribute:: instance :type: str .. py:exception:: STACValidationException Bases: :py:obj:`RFC9457Exception` STAC validation Exception .. py:attribute:: status_code :value: 400 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/stac-validation' .. py:attribute:: title :value: 'Your request in invalid' .. py:attribute:: detail :value: 'Your request is invalid -- please ensure your request is valid and try again.' .. py:exception:: AuthorizationException(instance: str) Bases: :py:obj:`RFC9457Exception` Authorization Exception .. py:attribute:: status_code :value: 403 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/missing-permission' .. py:attribute:: title :value: 'You do not have permission' .. py:attribute:: detail :value: 'You do not have the required permission to perform that operation -- please check with your... .. py:attribute:: instance .. py:exception:: ItemAlreadyExistsException(collection: str, item: str, instance: str) Bases: :py:obj:`RFC9457Exception` Item already exists Exception .. py:attribute:: status_code :value: 409 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/item-already-exists' .. py:attribute:: title :value: 'The Item you attempted to publish already exists' .. py:attribute:: detail .. py:attribute:: item .. py:attribute:: instance .. py:exception:: ItemDoesNotExistException(collection: str, item: str, instance: str) Bases: :py:obj:`RFC9457Exception` Item does not exist Exception .. py:attribute:: status_code :value: 404 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/item-does-not-exist' .. py:attribute:: title :value: 'The Item you attempted to update does not exist' .. py:attribute:: detail .. py:attribute:: item .. py:attribute:: instance .. py:exception:: UnknownException(instance: str) Bases: :py:obj:`RFC9457Exception` Unknown Exception .. py:attribute:: status_code :value: 500 .. py:attribute:: type :value: 'https://esgf.io/publication/errors/unknown' .. py:attribute:: title :value: 'An unidentified server side error occurred' .. py:attribute:: detail :value: 'Please report this error to help@esgf.io so that we can identify and correct the problem.' .. py:attribute:: instance