Package org.apache.calcite.avatica.remote

# Class Service.ErrorResponse

java.lang.Object
org.apache.calcite.avatica.remote.Service.Base
org.apache.calcite.avatica.remote.Service.Response
org.apache.calcite.avatica.remote.Service.ErrorResponse

Enclosing interface:
  Service

public static class Service.ErrorResponse extends Service.Response
Response for any request that the server failed to successfully perform. It is used internally by the transport layers to format errors for transport over the wire. Thus, `Service.apply(org.apache.calcite.avatica.remote.Service.CatalogsRequest)` will never return an ErrorResponse.

## Field Summary

Fields
Modifier and Type
Field
Description
`final int`
`errorCode`
`final String`
`errorMessage`
`final List<String>`
`exceptions`
`static final int`
`MISSING_CONNECTION_ERROR_CODE`
`final Service.RpcMetadataResponse`
`rpcMetadata`
`final AvaticaSeverity`
`severity`
`final String`
`sqlState`
`static final int`
`UNAUTHORIZED_ERROR_CODE`
`static final String`
`UNAUTHORIZED_SQL_STATE`
`static final int`
`UNKNOWN_ERROR_CODE`
`static final String`
`UNKNOWN_SQL_STATE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ErrorResponse(Exception e, String errorMessage, int code, String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)`
`protected`
`ErrorResponse(String errorMessage, int code, String sqlState, AvaticaSeverity severity, List<String> exceptions, Service.RpcMetadataResponse rpcMetadata)`
``
`ErrorResponse(List<String> exceptions, String errorMessage, int errorCode, String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`hashCode()`
`org.apache.calcite.avatica.proto.Responses.ErrorResponse`
`serialize()`
`AvaticaClientRuntimeException`
`toException()`
`String`
`toString()`

### Methods inherited from class org.apache.calcite.avatica.remote.Service.Base

`p, p, p, p`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### UNKNOWN_ERROR_CODE

public static final int UNKNOWN_ERROR_CODE

See Also:
  - Constant Field Values

### MISSING_CONNECTION_ERROR_CODE

public static final int MISSING_CONNECTION_ERROR_CODE

See Also:
  - Constant Field Values

### UNAUTHORIZED_ERROR_CODE

public static final int UNAUTHORIZED_ERROR_CODE

See Also:
  - Constant Field Values

### UNKNOWN_SQL_STATE

public static final String UNKNOWN_SQL_STATE

See Also:
  - Constant Field Values

### UNAUTHORIZED_SQL_STATE

public static final String UNAUTHORIZED_SQL_STATE

See Also:
  - Constant Field Values

### exceptions

public final List<String> exceptions

### errorMessage

public final String errorMessage

### errorCode

public final int errorCode

### sqlState

public final String sqlState

### severity

public final AvaticaSeverity severity

### rpcMetadata

public final Service.RpcMetadataResponse rpcMetadata

## Constructor Details

### ErrorResponse

public ErrorResponse(List<String> exceptions, String errorMessage, int errorCode, String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)

### ErrorResponse

protected ErrorResponse(Exception e, String errorMessage, int code, String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)

### ErrorResponse

protected ErrorResponse(String errorMessage, int code, String sqlState, AvaticaSeverity severity, List<String> exceptions, Service.RpcMetadataResponse rpcMetadata)

## Method Details

### serialize

public org.apache.calcite.avatica.proto.Responses.ErrorResponse serialize()

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### toException

public AvaticaClientRuntimeException toException()