OCAPI global exceptions 19.3

The following table lists all OCAPI global exceptions:

Status Type Arguments Description
400 BodyDecodingException

body (String)

The request document (body) could not be decoded.
400 EnumConstraintViolationException

document (String)

enumValue (String)

Invalid enum value provided.
400 FieldNotSortableException

field (String)

The specified field is not sortable.
400 HookStatusException

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.
400 IllegalEnumerationValueException

value (String)

type (String)

Illegal enum value provided for field type.
400 IllegalHttpMethodOverrideException

method (String)

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

clientId (String)

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

expandValue (String)

The specified expand value is not allowed.
400 InvalidHostHeaderException

host (String)

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

field (String)

value (String)

type (String)

The type of the search value does not match the expected field type.
400 InvalidVersionException   Version is missing or malformed in request URL.
400 MalformedLocaleException

locale (String)

The specified locale is malformed.
400 MalformedMediaTypeException

mediaType (String)

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

parameter (String)

value (String)

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

selector (String)

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

parameter (String)

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

document (String)

path (String)

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

property (String)

document (String)

A property in the given request document is not permitted to be modified.
400 QuerySearchTypesNomatchException

field1 (String)

field2 (String)

type1 (String)

type2 (String)

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

msg (String)

A platform quota constraint is violated.
400 RangeFilterTypeException

field (String)

type (String)

The specified field type is not comparable in a range expression.
400 RangeFilterValueException

field (String)

value (String)

The specified value is not comparable in a range expression.
400 ResourcePathException

message (String)

The resource path was completely incorrect.
400 SearchOperatorNotApplicableException

operator (String)

field (String)

The specified search operator is not applicable for the search field.
400 StartAfterEndException

document (String)

resourceId (String)

startDate (DateTime)

endDate (DateTime)

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

parameter (String)

expected (String)

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

field (String)

operator (String)

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

path (String)

expectedTypes (String)

actualType (String)

The type of a document property is invalid.
400 UnexpectedVersionException

version (String)

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

locale (String)

The specified locale is not unknown.
400 UnknownPropertyException

property (String)

document (String)

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

field (String)

The search field is unknown.
400 UnknownSearchOperatorException

operator (String)

The specified search operator is unknown.
400 UnknownSiteIdException

siteId (String)

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

field (String)

The specified search field in not queryable.
400 UnsupportedCurrencyException

currency (String)

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

locale (String)

The specified locale is not supported/activated.
400 ValueConstraintViolationException

parameter (String)

expected (String)

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

clientId (String)

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

accessToken (String)

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

origin (String)

The request origin is not authorized to perform the request.
401 UnauthorizedReadAccessException

method (String)

path (String)

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

method (String)

path (String)

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

clientId (String)

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

method (String)

path (String)

The current client is not authorized to access the resource.
403 OrganizationAccessForbiddenException   Global access via "/s/-/" is forbidden. Expected site-specific access via "/s/{site-id}/".
403 SecureCommunicationRequiredException   The request requires a secure connection (HTTPS).
403 SiteAccessForbiddenException

siteId (String)

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

siteId (String)

Access to the offline site is forbidden.
403 UserAccessForbiddenException

method (String)

path (String)

The current user is not authorized to access the resource.
404 CurrencyNotFoundException

currencyId (String)

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

path (String)

The resource could not be found in specified API and version.
404 UnknownSiteException

siteId (String)

No site found for specified site id.
404 VersionNotFoundException

version (String)

Version specified in URL is either unknown.
405 MethodNotAllowedException

method (String)

The HTTP method is not allowed.
406 CharsetNotAcceptableException

charset (String)

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

objectId (String)

Object is already in (asynchronous) deletion.
409 ResourceStateConflictException

client (String)

server (String)

A state token was sent with the request and does not match the object's state on server side.
412 InvalidIfMatchException

ifMatch (String)

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

contentType (String)

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

format (String)

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