Newer Version Available

This content describes an older version of this product. View Latest

Errors

Operations that you perform with Bulk API might trigger error codes. The following list shows the most common error codes and the Bulk API action that might have triggered them.
ClientInputError
The operation failed with an unknown client-side error.
For binary attachments, the request content is provided both as an input stream and an attachment.
ExceededQuota
The job or batch you tried to create exceeds the allowed number for the past 24 hour period.
FeatureNotEnabled
Bulk API is not enabled for this organization.
InvalidBatch
The batch ID specified in a batch update or query is invalid.
This error code is returned for binary attachments when the zip content is malformed or the following conditions occur:
  • The request.txt file can't be found, can't be read, is a directory, or contains invalid content.
  • The decompressed size of a binary attachment is too large.
  • The size of the zip file is too large.
  • The total decompressed size of all the binary attachments is too large.

A StatusCode of INVALID_FIELD is returned for the following conditions:

  • A binary file referenced in the batch data is missing or is a directory.
  • A binary file referenced in the batch data doesn't start with #.

Note

For more information about binary attachment limits, see General Limits.
InvalidJob
The job ID specified in a query or update for a job, or a create, update, or query for batches is invalid.
The user attempted to create a job using a zip content type in API version 19.0 or earlier.
InvalidJobState
The job state specified in a job update operation is invalid.
InvalidOperation
The operation specified in a URI for a job is invalid. Check the spelling of “job” in the URI.
InvalidSessionId
The session ID specified is invalid.
InvalidUrl
The URI specified is invalid.
InvalidUser
Either the user sending an Bulk API request doesn't have the correct permission, or the job or batch specified was created by another user.
InvalidXML
XML contained in the request body is invalid.
Timeout
The connection timed out. This error is thrown if Salesforce takes too long to process a batch. For more information on timeout limits, see Batch processing time. If you get a timeout error when processing a batch, split your batch into smaller batches, and try again.
TooManyLockFailure
Too many lock failures while processing the current batch. This error may be returned during processing of a batch. To resolve, analyze the batches for lock conflicts. See General Limits.
Unknown
Exception with unknown cause occurred.

In addition, Bulk API uses the same status codes and exception codes as SOAP API. For more information on these codes, see “ExceptionCode” in the SOAP API Developer Guide.