Package org.apache.solr.client.solrj

# Class RemoteSolrException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.solr.common.SolrException
org.apache.solr.client.solrj.RemoteSolrException

All Implemented Interfaces:
  `Serializable`

public final class RemoteSolrException extends SolrException
Subclass of SolrException that allows us to capture an arbitrary HTTP status code and error details that may have been returned by the remote server or a proxy along the way.

See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.solr.common.SolrException

`SolrException.ErrorCode`

## Field Summary

### Fields inherited from class org.apache.solr.common.SolrException

`details, metadata`

## Constructor Summary

Constructors
Constructor
Description
`RemoteSolrException(String remoteHost, int code, Object remoteError)`
`RemoteSolrException(String remoteHost, int code, Object remoteError, boolean skipRetry)`
`RemoteSolrException(String remoteHost, int code, String msg, Throwable th)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getMessage()`
`Object`
`getRemoteErrorObject()`
`String`
`getResponseMessage()`
`boolean`
`shouldSkipRetry()`

### Methods inherited from class org.apache.solr.common.SolrException

`code, getDetails, getMetadata, getMetadata, getRootCause, getRootThrowable, getThrowable, logDebugWithMdc, logInfoWithMdc, logWarnWithMdc, setDetails, setMetadata, setMetadata, wrapLuceneTragicExceptionIfNecessary`

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

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

## Constructor Details

### RemoteSolrException

public RemoteSolrException(String remoteHost, int code, String msg, Throwable th)

Parameters:
  `remoteHost` - the host the error was received from
  `code` - Arbitrary HTTP status code
  `msg` - Exception Message
  `th` - Throwable to wrap with this Exception

### RemoteSolrException

public RemoteSolrException(String remoteHost, int code, Object remoteError)

Parameters:
  `remoteHost` - the host the error was received from
  `code` - Arbitrary HTTP status code
  `remoteError` - Error response sent back from remoteHost

### RemoteSolrException

public RemoteSolrException(String remoteHost, int code, Object remoteError, boolean skipRetry)

Parameters:
  `remoteHost` - the host the error was received from
  `code` - Arbitrary HTTP status code
  `remoteError` - Error response sent back from remoteHost
  `skipRetry` - Skip retry if the client is set to retry on failure

## Method Details

### getResponseMessage

public String getResponseMessage()

Overrides:
  `getResponseMessage` in class `SolrException`

### getMessage

public String getMessage()

Overrides:
  `getMessage` in class `Throwable`

### getRemoteErrorObject

public Object getRemoteErrorObject()

### shouldSkipRetry

public boolean shouldSkipRetry()