Package org.apache.solr.common

# Enum Class SolrException.ErrorCode

java.lang.Object
java.lang.Enum<SolrException.ErrorCode>
org.apache.solr.common.SolrException.ErrorCode

All Implemented Interfaces:
  `Serializable`, `Comparable<SolrException.ErrorCode>`, `java.lang.constant.Constable`

Enclosing class:
  `SolrException`

public static enum SolrException.ErrorCode extends Enum<SolrException.ErrorCode>
This list of valid HTTP Status error codes that Solr may return when there is a "Server Side" error.

Since:
  solr 1.2

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`BAD_REQUEST`
`CONFLICT`
`FORBIDDEN`
`GATEWAY_TIMEOUT`
`INVALID_STATE`
`NOT_FOUND`
`SERVER_ERROR`
`SERVICE_UNAVAILABLE`
`TOO_MANY_REQUESTS`
`UNAUTHORIZED`
`UNKNOWN`
`UNSUPPORTED_MEDIA_TYPE`

## Field Summary

Fields
Modifier and Type
Field
Description
`final int`
`code`

## Method Summary

Modifier and Type
Method
Description
`static SolrException.ErrorCode`
`getErrorCode(int c)`
`static SolrException.ErrorCode`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static SolrException.ErrorCode[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

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

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### BAD_REQUEST

public static final SolrException.ErrorCode BAD_REQUEST

### UNAUTHORIZED

public static final SolrException.ErrorCode UNAUTHORIZED

### FORBIDDEN

public static final SolrException.ErrorCode FORBIDDEN

### NOT_FOUND

public static final SolrException.ErrorCode NOT_FOUND

### CONFLICT

public static final SolrException.ErrorCode CONFLICT

### UNSUPPORTED_MEDIA_TYPE

public static final SolrException.ErrorCode UNSUPPORTED_MEDIA_TYPE

### TOO_MANY_REQUESTS

public static final SolrException.ErrorCode TOO_MANY_REQUESTS

### SERVER_ERROR

public static final SolrException.ErrorCode SERVER_ERROR

### SERVICE_UNAVAILABLE

public static final SolrException.ErrorCode SERVICE_UNAVAILABLE

### GATEWAY_TIMEOUT

public static final SolrException.ErrorCode GATEWAY_TIMEOUT

### INVALID_STATE

public static final SolrException.ErrorCode INVALID_STATE

### UNKNOWN

public static final SolrException.ErrorCode UNKNOWN

## Field Details

### code

public final int code

## Method Details

### values

public static SolrException.ErrorCode[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static SolrException.ErrorCode valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null

### getErrorCode

public static SolrException.ErrorCode getErrorCode(int c)