Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Intopictoc

This topic explains why you may be getting certain error codes when using the Push API, and provides some of the most common ways to handle those errors.

400 INVALID_JSON

Why Am I Getting This Error?

The body of your Push API call may be incorrectly formatted, or it may lack certain required key-value pairs.

What Should I Do?

401 UNAUTHORIZED

Why Am I Getting This Error?

You are trying to make an unauthenticated Push API call.

What Should I Do?

Ensure that you include the Authorization: Bearer <MyAccessToken> header in your call. Replace <MyAccessToken> with a Coveo Cloud V2 platform OAuth2 token (see Getting Your Coveo Cloud V2 Platform Access Token) or an API key (see Creating an API Key) with the required privileges (see Getting the Privileges of an Access Token).

401 INVALID_TOKEN

Why Am I Getting This Error?

The Coveo Cloud V2 platform does not recognize the access token you are using to authenticate your Push API call.

What Should I Do?

  • If you are using an OAuth2 token to authenticate your call, this token may be expired. Try again using a fresh Coveo Cloud V2 platform OAuth2 token (see Getting Your Coveo Cloud V2 Platform Access Token).
  • If you are using an API key to authenticate your call, this key may have been disabled or deleted in the target Coveo Cloud V2 organization, or your IP address may not have access to this key. Ask an administrator to modify the API key accordingly, or to create a new API key with the required privileges for you.

403 ACCESS_DENIED

Why Am I Getting This Error?

The access token you are using to authenticate your Push API call does not grant you sufficient privileges to perform the operation.

What Should I Do?

  • If you are using an OAuth2 token to authenticate your call, your identity probably does not have the required privileges in the target Coveo Cloud V2 organization. Ask an administrator to grant you those privileges. Alternatively, the administrator could create an API key with the required privileges for you.
  • If you are using an API key to authenticate your call, this API key probably does not have the required privileges. Ask an administrator to modify the API key accordingly, or to create a new API key with the required privileges for you.

412 SOURCE_DOES_NOT_EXIST

Why Am I Getting This Error?

The Coveo Cloud V2 platform does not recognize the sourceId you provided as an argument when making your Push API call.

What Should I Do?

  • Ensure that you have correctly spelled the sourceId of the target source (see Getting the sourceId).

  • Ensure that the source you want to push content into has been successfully created in the target Coveo Cloud V2 organization.

    Info
    iconfalse
    titleNote:

    Creating the very first source in a new Coveo Cloud V2 organization usually takes around 10 minutes, since this organization needs to be provisioned first.

    Once the organization has been successfully provisioned, though, creating subsequent sources should only take a few seconds.

412 MISSING_PARAMETER

Why Am I Getting This Error?

You did not provide a value for at least one of the required parameters of your Push API call.

What Should I Do?

Ensure that you pass a valid argument for all of the required path and query parameters of the call.

412 INVALID_PARAMETER

Why Am I Getting This Error?

At least one of the arguments you provided when making your Push API call is invalid.

What Should I Do?

Ensure that all arguments you pass when making your call are of the expected type (i.e., boolean, integer, long, etc.).

413 Request Entity Too Large

Why Am I Getting This Error?

You are trying to perform a push operation whose total size exceeds the allowed limit (see Push API Limits - Request Size Limits).

What Should I Do?

  • If you are pushing a single compressed or uncompressed item whose data size exceeds 5 megabytes, use a large file container to push the item, rather than directly providing its Data or CompressedBinaryData in the body of the call (see Pushing Large Items to a Source).
  • If you are pushing a batch of items whose total size exceeds 256 megabytes, try pushing smaller batches.
  • If you are using a large file container to push a single large item whose uncompressed size exceeds 256 megabytes, try compressing the item using one of the supported algorithms (Deflate, GZip, LZMA, or ZLib) before pushing it again.

415 UNSUPPORTED_MEDIA_TYPE

Why Am I Getting This Error?

You are trying to make a Push API call using the wrong content type.

What Should I Do?

In most cases, ensure that you include the Content-Type: application/json HTTP header in your call.

The only exception is when you are uploading content to an AWS container (see Pushing Item Data - Using the CompressedBinaryFileId Property). In this specific case, you must include the Content-Type: application/octet-stream and x-amz-server-side-encryptionAES256 headers instead.

429 TOO_MANY_REQUESTS

Why Am I Getting This Error?

You have exceeded the maximum number of Push API calls you can make in a given amount of time. Consequently, your calls are now being throttled by the service (see Push API Limits - Recommended Maximum Number of Items/Security Identities per Hour).

What Should I Do?

Wait until your calls are no longer being throttled before using the service again (this may take up to a week). In the future, ensure that you make Push API calls at a slower pace.

5XX

Why Am I Getting This Error?

You have triggered an unhandled error, or there is an issue with the Push API service itself, or with AWS (see Error Handling Patterns in API Gateway and AWS Lambda).

What Should I Do?

  • If you are obviously not responsible for the error, try performing the operation again (with an exponential backoff). AWS issues typically resolve themselves when given enough time.
  • You can monitor the status of the Coveo Cloud V2 platform from status.cloud.coveo.com.