esgf_core_utils.models.exceptions

Exceptions

MissingPermissionException

Missing Permission Exception

OperationNotPermittedException

Operation not permitted Exception

UnexpectedExtensionException

Unexpected extenison Exception

ExpectedExtensionsMissingException

Expected extension missing Exception

RFC9457Exception

RFC 9457 Exception

STACValidationException

STAC validation Exception

AuthorizationException

Authorization Exception

ItemAlreadyExistsException

Item already exists Exception

ItemDoesNotExistException

Item does not exist Exception

UnknownException

Unknown Exception

Package Contents

exception esgf_core_utils.models.exceptions.MissingPermissionException(permission_type: str, target: str, role: str = '')

Bases: Exception

Missing Permission Exception

type
role = ''
target
exception esgf_core_utils.models.exceptions.OperationNotPermittedException(op: str)

Bases: Exception

Operation not permitted Exception

status_code = 400
type = 'https://esgf.io/publication/errors/operation-not-permitted'
title = 'The operation you attempted is not permitted'
detail
exception esgf_core_utils.models.exceptions.UnexpectedExtensionException(extension: str)

Bases: Exception

Unexpected extenison Exception

status_code = 400
type = 'https://esgf.io/publication/errors/unexpected-extension'
title = 'There is an unexpected extension in your request'
detail
exception esgf_core_utils.models.exceptions.ExpectedExtensionsMissingException(extensions: list[str])

Bases: Exception

Expected extension missing Exception

status_code = 400
type = 'https://esgf.io/publication/errors/expected-extension-missing'
title = 'A required extension is missing from your request'
detail = 'Your request is missing required extensions: `[]` -- please add this extenison and try again.'
exception esgf_core_utils.models.exceptions.RFC9457Exception

Bases: Exception

RFC 9457 Exception

status_code: int
type: str
title: str
detail: str
instance: str
exception esgf_core_utils.models.exceptions.STACValidationException

Bases: RFC9457Exception

STAC validation Exception

status_code = 400
type = 'https://esgf.io/publication/errors/stac-validation'
title = 'Your request in invalid'
detail = 'Your request is invalid -- please ensure your request is valid and try again.'
exception esgf_core_utils.models.exceptions.AuthorizationException(instance: str)

Bases: RFC9457Exception

Authorization Exception

status_code = 403
type = 'https://esgf.io/publication/errors/missing-permission'
title = 'You do not have permission'
detail = 'You do not have the required permission to perform that operation -- please check with your...
instance
exception esgf_core_utils.models.exceptions.ItemAlreadyExistsException(collection: str, item: str, instance: str)

Bases: RFC9457Exception

Item already exists Exception

status_code = 409
type = 'https://esgf.io/publication/errors/item-already-exists'
title = 'The Item you attempted to publish already exists'
detail
item
instance
exception esgf_core_utils.models.exceptions.ItemDoesNotExistException(collection: str, item: str, instance: str)

Bases: RFC9457Exception

Item does not exist Exception

status_code = 404
type = 'https://esgf.io/publication/errors/item-does-not-exist'
title = 'The Item you attempted to update does not exist'
detail
item
instance
exception esgf_core_utils.models.exceptions.UnknownException(instance: str)

Bases: RFC9457Exception

Unknown Exception

status_code = 500
type = 'https://esgf.io/publication/errors/unknown'
title = 'An unidentified server side error occurred'
detail = 'Please report this error to help@esgf.io so that we can identify and correct the problem.'
instance