---
title: Shared
url: https://platform.claude.com/docs/en/api/java/$shared
---

# Shared

## Domain types

### API Error Object

- `class ApiErrorObject`

  - `JsonValue type = "api_error"`

  - `String message`

### Authentication Error

- `class AuthenticationError`

  - `JsonValue type = "authentication_error"`

  - `String message`

### Billing Error

- `class BillingError`

  - `JsonValue type = "billing_error"`

  - `String message`

### Error Object

- `class ErrorObject: union`

  - `class InvalidRequestError`

    - `JsonValue type = "invalid_request_error"`

    - `String message`

  - `class AuthenticationError`

    - `JsonValue type = "authentication_error"`

    - `String message`

  - `class BillingError`

    - `JsonValue type = "billing_error"`

    - `String message`

  - `class PermissionError`

    - `JsonValue type = "permission_error"`

    - `String message`

  - `class NotFoundError`

    - `JsonValue type = "not_found_error"`

    - `String message`

  - `class RateLimitError`

    - `JsonValue type = "rate_limit_error"`

    - `String message`

  - `class GatewayTimeoutError`

    - `JsonValue type = "timeout_error"`

    - `String message`

  - `class ApiErrorObject`

    - `JsonValue type = "api_error"`

    - `String message`

  - `class OverloadedError`

    - `JsonValue type = "overloaded_error"`

    - `String message`

### Error Response

- `class ErrorResponse`

  - `JsonValue type = "error"`

  - `ErrorObject error`

    - `class InvalidRequestError`

      - `JsonValue type = "invalid_request_error"`

      - `String message`

    - `class AuthenticationError`

      - `JsonValue type = "authentication_error"`

      - `String message`

    - `class BillingError`

      - `JsonValue type = "billing_error"`

      - `String message`

    - `class PermissionError`

      - `JsonValue type = "permission_error"`

      - `String message`

    - `class NotFoundError`

      - `JsonValue type = "not_found_error"`

      - `String message`

    - `class RateLimitError`

      - `JsonValue type = "rate_limit_error"`

      - `String message`

    - `class GatewayTimeoutError`

      - `JsonValue type = "timeout_error"`

      - `String message`

    - `class ApiErrorObject`

      - `JsonValue type = "api_error"`

      - `String message`

    - `class OverloadedError`

      - `JsonValue type = "overloaded_error"`

      - `String message`

  - `Optional<String> requestId`

### Error Type

- `enum ErrorType`

  - `INVALID_REQUEST_ERROR("invalid_request_error")`

  - `AUTHENTICATION_ERROR("authentication_error")`

  - `PERMISSION_ERROR("permission_error")`

  - `NOT_FOUND_ERROR("not_found_error")`

  - `RATE_LIMIT_ERROR("rate_limit_error")`

  - `TIMEOUT_ERROR("timeout_error")`

  - `OVERLOADED_ERROR("overloaded_error")`

  - `API_ERROR("api_error")`

  - `BILLING_ERROR("billing_error")`

### Gateway Timeout Error

- `class GatewayTimeoutError`

  - `JsonValue type = "timeout_error"`

  - `String message`

### Invalid Request Error

- `class InvalidRequestError`

  - `JsonValue type = "invalid_request_error"`

  - `String message`

### Not Found Error

- `class NotFoundError`

  - `JsonValue type = "not_found_error"`

  - `String message`

### Overloaded Error

- `class OverloadedError`

  - `JsonValue type = "overloaded_error"`

  - `String message`

### Permission Error

- `class PermissionError`

  - `JsonValue type = "permission_error"`

  - `String message`

### Rate Limit Error

- `class RateLimitError`

  - `JsonValue type = "rate_limit_error"`

  - `String message`
