Errors

Error responses in the Import API.

Representations

Error responses always contain the following fields:

  • code - String
    An error identifier.
  • message - String
    A plain language description of the cause of an error.

An error response may contain additional fields depending on the type of an error, for example, attribute in DuplicateAttributeValueError.

Below is the list of all error responses.

List of error responses

AccessDeniedError

This is the generic error code for access denied. In case of a wrong scope, an InvalidScopeError will be returned.

code
String
"access_denied"
message
String

ConcurrentModificationError

The request conflicts with the current state of the involved resources. This error typically occurs when the request attempts to modify a resource that is out of date, that is, it has been modified by another client since the last time it was retrieved by the system attempting to update it. The client application should resolve the conflict (with or without involving the end-user) before retrying the request.

code
String
"ConcurrentModification"
message
String
specifiedVersion
Int

The version specified in the failed request.

currentVersion
Int

The current version of the resource.

conflictedResource
Any

The resource in conflict.

ContentionError

code
String
"Contention"
message
String

DuplicateAttributeValueError

The Unique AttributeConstraintEnum was violated.

code
String
"DuplicateAttributeValue"
message
String
attribute
Attribute

The attribute in conflict.

DuplicateAttributeValuesError

The CombinationUnique AttributeConstraintEnum was violated.

code
String
"DuplicateAttributeValues"
message
String
attributes
Array of Attribute

DuplicateFieldError

The given value already exists for a field that is checked for unique values.

code
String
"DuplicateField"
message
String
field
String

The name of the field.

duplicateValue
Any

The offending duplicate value.

DuplicateVariantValuesError

The given combination of values of a Product Variant conflicts with an existing one. Every Product Variant must have a distinct combination of SKU, prices, and custom attribute values.

code
String
"DuplicateVariantValues"
message
String
variantValues
VariantValues

The offending variant values.

GenericError

code
String
"Generic"
message
String

InsufficientScopeError

code
String
"insufficient_scope"
message
String

InvalidCredentialsError

code
String
"InvalidCredentials"
message
String

InvalidFieldError

A given field is not supported. This error occurs, for example, if the field variants, which is not supported by Product Import, is sent to the Product Import endpoint.

code
String
"InvalidField"
message
String
field
String

The name of the field.

invalidValue
Any

The invalid value.

allowedValues
Array of Any

The set of allowed values for the field, if any.

resourceIndex
Int

InvalidInput

An invalid input has been sent to the service. The client application should validate the input according to the constraints described in the error message before sending the request again.

code
String
"InvalidInput"
message
String

InvalidJsonInput

An invalid JSON input has been sent to the service. Either the JSON is syntactically incorrect or the JSON has an unexpected shape, for example, a required field is missing. The client application should validate the input according to the constraints described in the error message before sending the request again.

code
String
"InvalidJsonInput"
message
String

InvalidOperation

The resources in the request are not in the valid state for the operation. The client application should validate the constraints described in the error message before sending the request again.

code
String
"InvalidOperation"
message
String

InvalidScopeError

The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.

code
String
"invalid_scope"
message
String

InvalidStateTransitionError

code
String
"InvalidTransition"
message
String
currentState

Every Import Operation is assigned one of the following states.

newState

Every Import Operation is assigned one of the following states.

InvalidTokenError

code
String
"invalid_token"
message
String

RequiredFieldError

A required field is missing a value.

code
String
"RequiredField"
message
String
field
String

The name of the field.

ResourceCreationError

code
String
"ResourceCreation"
message
String
resource
Any

ResourceDeletionError

code
String
"ResourceDeletion"
message
String
resource
Any

ResourceNotFoundError

code
String
"ResourceNotFound"
message
String
resource
Any

ResourceUpdateError

code
String
"ResourceUpdate"
message
String
resource
Any