Skip to main content

InvalidEntityTypeError

Returned when an operation requires a specific entity type but the target entity has a different or unsupported type. For example, requesting file content from an entity that is not a MediaObject.

error objectrequired
codestringrequired

Possible values: [INVALID_ENTITY_TYPE]

messagestringrequired

Human-readable error message

Example: This operation is only valid for MediaObject entities
details object

Additional error details specific to the error type

entityTypestring

The actual entity type of the requested entity

Example: http://pcdm.org/models#Collection
expectedTypestring

The expected entity type for this operation

Example: http://schema.org/MediaObject
requestIdstring<uuid>

Unique identifier for this request, useful for debugging

Example: 550e8400-e29b-41d4-a716-446655440000
InvalidEntityTypeError
{
"error": {
"code": "INVALID_ENTITY_TYPE",
"message": "This operation is only valid for MediaObject entities",
"details": {
"entityType": "http://pcdm.org/models#Collection",
"expectedType": "http://schema.org/MediaObject"
},
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}