Banner image of a hand holding a Sony Xperia phone with an audio icon showing on the display and that is surrounded by 3 white line drawings of a speaker, a soundbar and a receiver (low resolution)

Audio Control API

Develop apps to control Sony's latest home audio devices.

Find out about error codes

The Audio Control API uses the HTTP and JSON-RPC protocols. This document describes the common status and error codes that the API uses for both protocols.

Error codes use the range of 0 to 65535, inclusive. This range is split into two areas, an Audio Control API system area and a User area, as described in the following table:

Error code range

Description

Error code range

0 - 32767

Description

Audio Control API system area

Error code range

32768 - 65535

Description

User area

The user area is further divided for each service, as described in the following table:

Error code range

Description

Error code range

32768 - 39999

Description

Unused

Error code range

40000 - 40199

Description

Non-service-specific error codes.

Error code range

40200 - 40399

Description

Error codes for the system service.

Error code range

40400 - 40599

Description

Error codes for the camera service.

Error code range

40600 - 40799

Description

Error codes for the videoScreen service.

Error code range

40800 - 40999

Description

Error codes for the audio service.

Error code range

41000 - 41199

Description

Error codes for the avContent service.

Error code range

41200 - 41399

Description

Error codes for the recording service.

Error code range

41400 - 41599

Description

Error codes for the appControl service.

Error code range

41600 - 41799

Description

Error codes for the browser service.

Error code range

42000 - 42199

Description

Error codes for the accessControl service.

Error code range

42200 - 42399

Description

Error codes for the contentDownload service.

Error code range

42400 - 42599

Description

Error codes for the encryption service.

Error code range

42600 - 42799

Description

Error codes for the contentSync service.

Error code range

42800 - 42999

Description

Error codes for the messaging service.

Error code range

43000 - 65535

Description

Reserved.

The tables in the rest of this page describe specific status or error codes. The following list describes how to interpret the columns of these tables.

  • Code: The status or error code, the first element of the error
  • Reason phrase example: An example error message, the second element of the error
  • JSON example: An example error array, as it might occur in a response object.
  • Explanation: A description of the error type.

Common HTTP codes for the Audio Control API

In general, the status codes are assigned using the following rules.

  • Each code should follow the original HTTP definition.
  • Each API-specific code should not duplicate an existing HTTP error code.

For responses with an HTTP status code other than 200 (OK) that also contain a response body, the Audio Control API error code will be the same as the HTTP status error code. The following table describes the primary error codes:

Code

Reason phrase examples

JSON example

Explanation

Code

401

Reason phrase examples

Unauthorized

JSON example

"error": [401, "Unauthorized"]

Explanation

The request requires user authentication.

Code

403

Reason phrase examples

Forbidden

JSON example

"error": [403, "Forbidden"]

Explanation

The server understood the request, but is refusing to fulfill it. Client does not have permission to access.

Code

404

Reason phrase examples

Not Found

JSON example

"error": [404, "Not Found"]

Explanation

For cases where request is not matched to any supported API version.

Code

413

Reason phrase examples

Request Entity Too Large

JSON example

"error": [413, "Request Entity Too Large"]

Explanation

The accepted body size of a client request exceeds maximum.

Code

414

Reason phrase examples

Request-URI Too Long

JSON example

"error": [414, "Request-URI Too Long"]

Explanation

The accepted URI length of a client request exceeds maximum.

Code

501

Reason phrase examples

Not Implemented

JSON example

"error": [501, "Not Implemented"]

Explanation

When the request method is not implemented on the server.

Code

503

Reason phrase examples

Service Unavailable

JSON example

"error": [503, "Service Unavailable"]

Explanation

When server is in a temporally unavailable state, which may occur due to too many concurrent connections. (We don't define the number of max connections, because it depends on the server.)

System error code

Code

Reason phrase examples

JSON example

Explanation

Code

1

Reason phrase examples

Any

JSON example

"error": [1, "Any"]

Explanation

A generic error code which can be used with any error. But it is recommended not to use.

Code

2

Reason phrase examples

Timeout

JSON example

"error": [2, "Timeout"]

Explanation

The server failed to reply in time.

Code

3

Reason phrase examples

Illegal Argument

JSON example

"error": [3, "Illegal Argument"]

Explanation

The request contains an invalid params value.

Code

5

Reason phrase examples

Illegal Request

JSON example

"error": [5, "Illegal Request"]

Explanation

The request body is empty, or the request has no ID or an invalid ID, or the request is for an undefined method, or the request has no params value or the params value is not an array.

Code

7

Reason phrase examples

Illegal State

JSON example

"error": [7, "Illegal State"]

Explanation

The server cannot handle the request at this time.

Code

12

Reason phrase examples

No Such Method

JSON example

"error": [12, "No Such Method"]

Explanation

The requested API is not defined.

Code

14

Reason phrase examples

Unsupported Version

JSON example

"error": [14, "Unsupported Version"]

Explanation

The requested version is not supported in the specified service.

Code

15

Reason phrase examples

Unsupported Operation

JSON example

"error": [15, "Unsupported Operation"]

Explanation

The server cannot handle the request with the specified parameters.

Common error code

Code

Reason phrase examples

JSON example

Explanation

Code

40000

Reason phrase examples

Request Retry

JSON example

"error": [40000, "Request Retry"]

Explanation

An HTTP long-polling timeout occurred.

Code

40001

Reason phrase examples

Client Over Maximum

JSON example

"error": [40001, "Clients Over Maximum"]

Explanation

The number of HTTP long-polling clients exceeds the maximum.

Code

40002

Reason phrase examples

Encryption Failed

JSON example

"error": [40002, "Encryption Failed"]

Explanation

Encryption error; a failure to encrypt or decrypt within the encryption API.

Code

40003

Reason phrase examples

Request Duplicated

JSON example

"error": [40003, "Request Duplicated"]

Explanation

The client is waiting for a response on a previous request.

Code

40004

Reason phrase examples

Multiple Settings Failed

JSON example

"error": [40004, "Multiple Settings Failed"]

Explanation

The service failed to update one or more settings. Call the associated get settings method to identify which settings still need to be updated.

Code

40005

Reason phrase examples

Display is turned off

JSON example

"error": [40005, "Display is turned off"]

Explanation

The display is turned off.

Code

40006

Reason phrase examples

Please contact the inquiry counter

JSON example

"error": [40006, "Exxxx"]

Explanation

A general error occurred, used by all services for debugging or display purposes. Refer to the error message for additional detail.

system Service error code

Code

Reason phrase examples

JSON example

Explanation

Code

40200

Reason phrase examples

Password expired

JSON example

"error": [40200, "Password expired"]

Explanation

Password expired.

Code

40201

Reason phrase examples

AC power required

JSON example

"error": [40201, "AC power required"]

Explanation

Server cannot run this method without AC power.

audio Service error code

Code

Reason phrase examples

JSON example

Code

40800

Reason phrase examples

Target Not Supported

JSON example

"error": [40800, "Target Not Supported"]

Code

40801

Reason phrase examples

Volume Out of Range

JSON example

"error": [40801, "Volume Out of Range"]

avContent Service error code

Code

Reason phrase examples

JSON example

Explanation

Code

41000

Reason phrase examples

Content is Protected

JSON example

"error": [41000, "Content is Protected"]

Explanation

Content is protected.

Code

41001

Reason phrase examples

Content does Not Exist

JSON example

"error": [41001, "Content does Not Exist"]

Explanation

Content does not exist.

Code

41002

Reason phrase examples

Storage has no content.

JSON example

"error": [41002, "Storage has no content."]

Explanation

Storage contains no content.

Code

41003

Reason phrase examples

Some content could not be deleted

JSON example

"error": [41003, "Some content could not be deleted"]

Explanation

Some content could not be deleted.

Code

41011

Reason phrase examples

Channel Fixed by USB Recording

JSON example

"error": [41011, "Channel Fixed by USB Recording"]

Explanation

Content cannot be played because device is currently recording.

Code

41012

Reason phrase examples

Channel Fixed by SCART Recording

JSON example

"error": [41012, "Channel Fixed by SCART Recording"]

Explanation

Content cannot be played because channel is currently recording.

Code

41013

Reason phrase examples

Chapter doesn't exist

JSON example

"error": [41013, "Chapter doesn't exist"]

Explanation

The chapter does not exist.

Code

41014

Reason phrase examples

Channel can't be uniquely determined.

JSON example

"error": [41014, "Channel can't be uniquely determined"]

Explanation

The channel cannot be uniquely determined.

Code

41015

Reason phrase examples

Empty Channel list.

JSON example

"error": [41015, "Empty Channel list"]

Explanation

The channel list is empty.

Code

41020

Reason phrase examples

Storage doesn't exist

JSON example

"error": [41020, "Storage doesn't exist"]

Explanation

No storage is available.

Code

41021

Reason phrase examples

Storage is full

JSON example

"error": [41021, "Storage is full"]

Explanation

The storage is full.

Code

41022

Reason phrase examples

Content attribute setting failed.

JSON example

"error": [41022, "Content attribute setting failed."]

Explanation

Failed to set a content attribute.

Code

41023

Reason phrase examples

Unknown group id.

JSON example

"error": [41023, "Unknown group id."]

Explanation

Unknown group ID.

Code

41024

Reason phrase examples

Content is not supported.

JSON example

"error": [41024, "Unsupported content"]

Explanation

The content is not supported.