Edit this page

The following listed example errors do not claim to be a complete list of all available and possible error responses.
Also, their texts and error codes might be outdated.

In order to find out all currently available errors, please inspect Ditto’s codebase and look at all implementations of the PolicyException interface.

policies:id.invalid

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 400,
    "error": "policies:id.invalid",
    "message": "Policy ID 'invalid id' is not valid!",
    "description": "It must conform to the namespaced entity ID notation (see Ditto documentation)",
    "href": "https://www.eclipse.dev/ditto/basic-namespaces-and-names.html#namespaced-id"
  },
  "status": 400
}

policies:policy.conflict

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 409,
    "error": "policies:policy.conflict",
    "message": "The Policy with ID 'org.eclipse.ditto:the_policy_id' already exists",
    "description": "Choose another Policy ID"
  },
  "status": 409
}

policies:policy.modificationinvalid

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:policy.modificationinvalid",
    "message": "The Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the resulting Policy would be invalid.",
    "description": "There must always be at least one PolicyEntry with 'WRITE' permissions on resource 'policy:/'."
  },
  "status": 403
}

policies:policy.notfound

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 404,
    "error": "policies:policy.notfound",
    "message": "The Policy with ID 'org.eclipse.ditto:the_policy_id' could not be found or requester had insufficient permissions to access it.",
    "description": "Check if the ID of your requested Policy was correct and you have sufficient permissions."
  },
  "status": 404
}

policies:policy.notmodifiable

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:policy.notmodifiable",
    "message": "The Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the requester had insufficient permissions.",
    "description": "Check if the ID of your requested Policy was correct and you have sufficient permissions."
  },
  "status": 403
}

policies:policy.toomanymodifyingrequests

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 429,
    "error": "policies:policy.toomanymodifyingrequests",
    "message": "Too many modifying requests are already outstanding to the Policy with ID 'org.eclipse.ditto:the_policy_id'.",
    "description": "Throttle your modifying requests to the Policy or re-structure your Policy in multiple Policies if you really need so many concurrent modifications."
  },
  "status": 429
}

policies:policy.unavailable

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 503,
    "error": "policies:policy.unavailable",
    "message": "The Policy with ID 'org.eclipse.ditto:the_policy_id' is not available, please try again later.",
    "description": "The requested Policy is temporarily not available."
  },
  "status": 503
}

policies:entry.invalid

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 400,
    "error": "policies:entry.invalid",
    "message": "The Policy Entry is invalid.",
    "description": "Policy entry does not contain any known permission like 'READ' or 'WRITE'"
  },
  "status": 400
}

policies:entry.modificationinvalid

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:entry.modificationinvalid",
    "message": "The PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the resulting Policy would be invalid.",
    "description": "There must always be at least one PolicyEntry with 'WRITE' permissions on resource 'policy:/'."
  },
  "status": 403
}

policies:entry.notfound

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 404,
    "error": "policies:entry.notfound",
    "message": "The PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be found or requester had insufficient permissions to access it.",
    "description": "Check if the ID of the Policy and the Label of your requested PolicyEntry was correct and you have sufficient permissions."
  },
  "status": 404
}

policies:entry.notmodifiable

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:entry.notmodifiable",
    "message": "The PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the requester had insufficient permissions.",
    "description": "Check if the ID of the Policy and the Label of your requested PolicyEntry was correct and you have sufficient permissions."
  },
  "status": 403
}

policies:subjects.notfound

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 404,
    "error": "policies:subjects.notfound",
    "message": "The Subjects of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be found or requester had insufficient permissions to access it.",
    "description": "Check if the ID of the Policy and the Label of the PolicyEntry was correct and you have sufficient permissions."
  },
  "status": 404
}

policies:subjects.notmodifiable

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:subjects.notmodifiable",
    "message": "The Subjects of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the requester had insufficient permissions.",
    "description": "Check if the ID of the Policy and the PolicyEntry's Label of your requested Subjects was correct and you have sufficient permissions."
  },
  "status": 403
}

policies:subject.notfound

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 404,
    "error": "policies:subject.notfound",
    "message": "The Subject with ID 'google:the_subjectid' of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be found or requester had insufficient permissions to access it.",
    "description": "Check if the ID of the Policy, the Label of the PolicyEntry and ID of your requested Subject was correct and you have sufficient permissions."
  },
  "status": 404
}

policies:subject.notmodifiable

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:subject.notmodifiable",
    "message": "The Subject with ID 'google:the_subjectid' of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the requester had insufficient permissions.",
    "description": "Check if the ID of the Policy, the Label of the PolicyEntry and ID of your requested Subject was correct and you have sufficient permissions."
  },
  "status": 403
}

policies:subjectid.invalid

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 400,
    "error": "policies:subjectid.invalid",
    "message": "Subject ID 'invalid subject' is not valid!",
    "description": "It must contain an issuer as prefix separated by a colon ':' from the actual subject"
  },
  "status": 400
}

policies:resources.notfound

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 404,
    "error": "policies:resources.notfound",
    "message": "The Resources of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be found or requester had insufficient permissions to access it.",
    "description": "Check if the ID of the Policy and the Label of the PolicyEntry was correct and you have sufficient permissions."
  },
  "status": 404
}

policies:resources.notmodifiable

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:resources.notmodifiable",
    "message": "The Resources of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the requester had insufficient permissions.",
    "description": "Check if the ID of the Policy and the PolicyEntry's Label of your requested Resources was correct and you have sufficient permissions."
  },
  "status": 403
}

policies:resource.notfound

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 404,
    "error": "policies:resource.notfound",
    "message": "The Resource '/the_resource_path' of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be found or requester had insufficient permissions to access it.",
    "description": "Check if the ID of the Policy, the Label of the PolicyEntry and the path of your requested Resource was correct and you have sufficient permissions."
  },
  "status": 404
}

policies:resource.notmodifiable

{
  "topic": "org.eclipse.ditto/the_policy_id/policies/errors",
  "headers": {
    "correlation-id": "<preserved-command-correlation-id>"
  },
  "path": "/",
  "value": {
    "status": 403,
    "error": "policies:resource.notmodifiable",
    "message": "The Resource '/the_resource_path' of the PolicyEntry with Label 'the_label' on the Policy with ID 'org.eclipse.ditto:the_policy_id' could not be modified as the requester had insufficient permissions.",
    "description": "Check if the ID of the Policy, the Label of the PolicyEntry and the path of your requested Resource was correct and you have sufficient permissions."
  },
  "status": 403
}