Skip to main content

Overview

ACP uses JSON-RPC 2.0 error codes to communicate errors between clients and agents. This page lists all standard and ACP-specific error codes used in the protocol.

Standard JSON-RPC Error Codes

These error codes are defined by the JSON-RPC 2.0 specification.

ACP-Specific Error Codes

These error codes are specific to the Agent Client Protocol.

Error Code Ranges

JSON-RPC 2.0 reserves specific ranges for different types of errors:
  • -32768 to -32000: Reserved for JSON-RPC specification errors
  • -32099 to -32000: Server error range (implementation-defined)
  • Custom application errors: Should use codes outside the reserved range

Usage Examples

Parse Error (-32700)

Response:

Invalid Request (-32600)

Response:

Method Not Found (-32601)

Response:

Invalid Params (-32602)

Response:

Internal Error (-32603)

Response:

Authentication Required (-32000)

Response:

Resource Not Found (-32002)

Response:

Error Handling Best Practices

1. Use Specific Error Codes

Choose the most specific error code for the situation:

2. Include Helpful Error Data

Provide additional context in the data field:

3. Handle Errors Gracefully

Catch and convert errors appropriately:

4. Document Custom Error Codes

If you define custom error codes (outside the reserved range), document them clearly:

See Also