Error Messages - Amazon IVS

Error Messages

WebSocket Errors

Error messages are pushed to clients if an operation fails. Due to the asynchronous nature of the Chat messaging API, WebSocket error messages include an identifier that the client can use to map back to the responsible operation.

Here is a sample WebSocket operation error message:

{ "ErrorCode": 400, "ErrorMessage": "Messages must be less than 240 chars", "Id": “IG5mcmlvdGlv”, "RequestId": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "Type": "ERROR" }
Field Format Description

ErrorCode

int

Error code (see below).

ErrorMessage

string

Descriptive error message.

Id

string

Identifier of the operation that caused this error. If the original operation had an identifier generated by Amazon IVS Chat, it is used here; otherwise, the Chat service generates an identifier for tracking purposes.

RequestId

string

An identifier optionally specified by your application for tracking purposes.

Type

string

ERROR

Error codes map to HTTP status codes which describe errors that clients may encounter when interacting with the Chat messaging WebSocket operations:

Error HTTP Status Code Description

Bad Request

400

The request is malformed or invalid.

Unauthorized

401

The connection has expired or the chat token is missing.

Forbidden

403

The connection’s capabilities do not permit this action, or the account is blocked from using chat because the account is pending verification.

Not Found

404

The room cannot be found (does not exist).

Not Acceptable

406

The request was rejected during message review.

Payload Too Large

413

The request contains fields that are too large.

Too Many Requests

429

The application has exceeded rate limits.

Internal Server Error

500

This is returned for a general error.

HTTP Errors

For errors common to all HTTP actions, see Common Errors in the Amazon IVS API Reference. For errors specific to Chat messaging, see the following table:

Error HTTP Status Code Description

InvalidParameterValue

400

The Chat message exceeds the character limit. See SendMessage (Publish).

ResourceNotFound

404

A resource referenced/mutated by the operation does not exist.