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
`private static com.google.protobuf.Descriptors.FieldDescriptor` `ERROR_MESSAGE_DESCRIPTOR`
`int` `errorCode`
`java.lang.String` `errorMessage`
`java.util.List<java.lang.String>` `exceptions`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `METADATA_DESCRIPTOR`
`static int` `MISSING_CONNECTION_ERROR_CODE`
`Service.RpcMetadataResponse` `rpcMetadata`
`AvaticaSeverity` `severity`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `SEVERITY_DESCRIPTOR`
`private static com.google.protobuf.Descriptors.FieldDescriptor` `SQL_DESCRIPTOR`
`java.lang.String` `sqlState`
`static int` `UNAUTHORIZED_ERROR_CODE`
`static java.lang.String` `UNAUTHORIZED_SQL_STATE`
`static int` `UNKNOWN_ERROR_CODE`
`static java.lang.String` `UNKNOWN_SQL_STATE`

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

`PRIME`

### Constructor Summary

Constructors
`(package private)` `ErrorResponse()`
`protected` `ErrorResponse​(java.lang.Exception e, java.lang.String errorMessage, int code, java.lang.String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)`
`protected` `ErrorResponse​(java.lang.String errorMessage, int code, java.lang.String sqlState, AvaticaSeverity severity, java.util.List<java.lang.String> exceptions, Service.RpcMetadataResponse rpcMetadata)`
`` `ErrorResponse​(java.util.List<java.lang.String> exceptions, java.lang.String errorMessage, int errorCode, java.lang.String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`(package private) Service.ErrorResponse` `deserialize​(com.google.protobuf.Message genericMsg)`
`boolean` `equals​(java.lang.Object o)`
`int` `hashCode()`
`Responses.ErrorResponse` `serialize()`
`AvaticaClientRuntimeException` `toException()`
`(package private) static java.util.List<java.lang.String>` `toStackTraces​(java.lang.Exception e)`
`java.lang.String` `toString()`
`(package private) static java.lang.String` `toString​(java.lang.Exception e)`

### 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 Detail

#### ERROR_MESSAGE_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor ERROR_MESSAGE_DESCRIPTOR

#### SQL_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor SQL_DESCRIPTOR

#### SEVERITY_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor SEVERITY_DESCRIPTOR

#### METADATA_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor METADATA_DESCRIPTOR

#### 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 java.lang.String UNKNOWN_SQL_STATE

See Also:
  Constant Field Values

#### UNAUTHORIZED_SQL_STATE

    public static final java.lang.String UNAUTHORIZED_SQL_STATE

See Also:
  Constant Field Values

#### exceptions

    public final java.util.List<java.lang.String> exceptions

#### errorMessage

    public final java.lang.String errorMessage

#### errorCode

    public final int errorCode

#### sqlState

    public final java.lang.String sqlState

#### severity

    public final AvaticaSeverity severity

#### rpcMetadata

    public final Service.RpcMetadataResponse rpcMetadata

### Constructor Detail

#### ErrorResponse

    ErrorResponse()

#### ErrorResponse

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

#### ErrorResponse

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

#### ErrorResponse

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

### Method Detail

#### toStackTraces

    static java.util.List<java.lang.String> toStackTraces​(java.lang.Exception e)

#### toString

    static java.lang.String toString​(java.lang.Exception e)

#### deserialize

    Service.ErrorResponse deserialize​(com.google.protobuf.Message genericMsg)

Specified by:
  `deserialize` in class `Service.Response`

#### serialize

    public Responses.ErrorResponse serialize()

Specified by:
  `serialize` in class `Service.Response`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### equals

    public boolean equals​(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### toException

    public AvaticaClientRuntimeException toException()