OCAPI Global Exceptions

The following table lists all OCAPI global exceptions:

StatusTypeArgumentsDescription
400BodyDecodingException

body (String)

The request document (body) couldn’t be decoded.
400EnumConstraintViolationException

document (String)

enumValue (String)

Invalid enum value provided.
400FieldNotSortableException

field (String)

The specified field isn’t sortable.
400HookStatusException

extensionPoint (String)

statusCode (String)

statusMsg (String)

statusDetails (Map)

An OCAPI server-side extension point returned a status of type error. The exception contains details like extension point name, status code, status message, and custom status details.
400IllegalEnumerationValueException

value (String)

type (String)

Illegal enum value provided for field type.
400IllegalHttpMethodOverrideException

method (String)

The HTTP method provided via x-dw-http-method-override header or method query parameter isn’t allowed. HTTP methods 'PUT', 'PATCH', 'DELETE', 'HEAD' and 'OPTIONS' are supported as override method.
400InvalidClientIdException

clientId (String)

The provided client id isn’t the expected one for this token request.
400InvalidCustomPropertyExceptionCan’t write custom property. Value is either invalid or type doesn't support modification.
400InvalidExpandValueException

expandValue (String)

The specified expand value isn’t allowed.
400InvalidHostHeaderException

host (String)

The host name is invalid. Not contained in the server allow list.
400InvalidSearchFieldTypeException

field (String)

value (String)

type (String)

The type of the search value doesn’t match the expected field type.
400InvalidVersionExceptionVersion is missing or malformed in request URL.
400MalformedLocaleException

locale (String)

The specified locale is malformed.
400MalformedMediaTypeException

mediaType (String)

The media type in Content-Type header is malformed.
400MalformedParameterException

parameter (String)

value (String)

A query, header, or path parameter value is malformed.
400MalformedSelectorException

selector (String)

The syntax of the specified selector is malformed.
400MissingClientIdExceptionNo client id was provided, neither as query nor as header parameter.
400NullConstraintViolationException

parameter (String)

The query or path parameter value is required, but value was null.
400PropertyConstraintViolationException

document (String)

path (String)

The value constraint of a document property is violated.
400PropertyNotPermittedException

property (String)

document (String)

A property in the given request document isn’t permitted to be modified.
400QuerySearchTypesNomatchException

field1 (String)

field2 (String)

type1 (String)

type2 (String)

The fields in the specified query don't have the same type.
400QuotaExceededException

msg (String)

A platform quota constraint is violated.
400RangeFilterTypeException

field (String)

type (String)

The specified field type isn’t comparable in a range expression.
400RangeFilterValueException

field (String)

value (String)

The specified value isn’t comparable in a range expression.
400ResourcePathException

message (String)

The resource path was incorrect.
400SearchOperatorNotApplicableException

operator (String)

field (String)

The specified search operator isn’t applicable for the search field.
400StartAfterEndException

document (String)

resourceId (String)

startDate (DateTime)

endDate (DateTime)

The specified start date is greater than the end date.
400StringConstraintViolationException

parameter (String)

expected (String)

The value constraint of a String query or path parameter is violated.
400TermOperatorMismatchValuesException

field (String)

operator (String)

The search operator doesn't match the specified values.
400TypeDecodingException

path (String)

expectedTypes (String)

actualType (String)

The type of a document property is invalid.
400UnexpectedVersionException

version (String)

The version of the request document is invalid. It has to be the URL version.
400UnknownLocaleException

locale (String)

The specified locale is unknown.
400UnknownPropertyException

property (String)

document (String)

A property in the given request document is unknown.
400UnknownSearchFieldException

field (String)

The search field is unknown.
400UnknownSearchOperatorException

operator (String)

The specified search operator is unknown.
400UnknownSiteIdException

siteId (String)

The site id provided for a site-specific property is unknown.
400UnqueryableFieldException

field (String)

The specified search field in not queryable.
400UnsupportedCurrencyException

currency (String)

The specified currency is invalid (must be ISO 4217) or not supported.
400UnsupportedLocaleException

locale (String)

The specified locale isn’t supported/activated.
400ValueConstraintViolationException

parameter (String)

expected (String)

The value constraint of a Non-String query or path parameter is violated.
401AuthorizationHeaderMissingExceptionAuthorization header is missing.
401DemoClientIdException

clientId (String)

Demo client ids aren’t allowed to be used on development, staging, or production instances. Demo client ids are permitted on sandbox instances only.
401InvalidAccessTokenException

accessToken (String)

The OAuth access token sent via Authorization: Bearer header is invalid.
401InvalidAuthorizationHeaderExceptionInvalid Authorization header. Value should be something like 'Bearer {access_token}'.
401InvalidSecureTokenExceptionThe session secure token is invalid. Session may have been hijacked.
401UnauthorizedOriginException

origin (String)

The request origin isn’t authorized to perform the request.
401UnauthorizedReadAccessException

method (String)

path (String)

The client application has no READ privileges for the resource.
401UnauthorizedWriteAccessException

method (String)

path (String)

The client application has no WRITE privileges for the resource.
401UnknownClientIdException

clientId (String)

No client application found for specified client id.
403AccessWithoutUserForbiddenExceptionTo access the resource an authenticated user is required.
403ClientAccessForbiddenException

method (String)

path (String)

The current client isn’t authorized to access the resource.
403OrganizationAccessForbiddenExceptionGlobal access via "/s/-/" is forbidden. Expected site-specific access via "/s/{site-id}/".
403SecureCommunicationRequiredExceptionThe request requires a secure connection (HTTPS).
403SiteAccessForbiddenException

siteId (String)

Site-specific access via "/s/{site-id}/" is forbidden. Expected global access via "/s/-/".
403SiteOfflineException

siteId (String)

Access to the offline site is forbidden.
403UserAccessForbiddenException

method (String)

path (String)

The current user isn’t authorized to access the resource.
404CurrencyNotFoundException

currencyId (String)

No currency found for specified mnemonic. Expected ISO 4217 mnemonic code.
404ResourcePathNotFoundException

path (String)

The resource couldn’t be found in specified API and version.
404UnknownSiteException

siteId (String)

No site found for specified site id.
404VersionNotFoundException

version (String)

Version specified in URL is either unknown.
405MethodNotAllowedException

method (String)

The HTTP method isn’t allowed.
406CharsetNotAcceptableException

charset (String)

Unsupported charset in Accept-Charset header. Only UTF-8 is allowed.
409IfMatchRequiredExceptionIf-Match header is required, but no one was provided.
409ObjectInDeletionConflictException

objectId (String)

Object is already in (asynchronous) deletion.
409ResourceStateConflictException

client (String)

server (String)

A state token was sent with the request and doesn’t match the object's state on server side.
412InvalidIfMatchException

ifMatch (String)

The If-Match header entity tag is invalid or out-dated.
413RequestEntityTooLargeExceptionRequest body size limit of 5 MB has been exceeded.
415UnsupportedContentTypeException

contentType (String)

Unsupported media type in Content-Type header. Only 'application/json', 'application/xml' and 'text/xml' are allowed.
415UnsupportedFormatException

format (String)

Unsupported format in format query parameter. Only 'json' and 'xml' are allowed.