Package ru.tinkoff.kora.http.common
Enum Class HttpResultCode
- All Implemented Interfaces:
Serializable,Comparable<HttpResultCode>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionauth_error - ошибка авторизации, обычно коды 401 и 403client_error - ошибки клиента, когда клиент не смог обработать ответ (4xx ответы)connection_error - ошибки возникающие, когда ответ вообще не получен: переполнения пулов, таймауты на сети, etc.limit_error - ошибки лимитов, обычно код 429server_error - когда клиент не смог обработать запрос по вине сервера (5xx ответы)success - всё завершилось успешно -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpResultCodefromStatusCode(int code) string()static HttpResultCodeReturns the enum constant of this class with the specified name.static HttpResultCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
success - всё завершилось успешно -
LIMIT_ERROR
limit_error - ошибки лимитов, обычно код 429 -
AUTH_ERROR
auth_error - ошибка авторизации, обычно коды 401 и 403 -
CLIENT_ERROR
client_error - ошибки клиента, когда клиент не смог обработать ответ (4xx ответы) -
SERVER_ERROR
server_error - когда клиент не смог обработать запрос по вине сервера (5xx ответы) -
CONNECTION_ERROR
connection_error - ошибки возникающие, когда ответ вообще не получен: переполнения пулов, таймауты на сети, etc.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromStatusCode
-
string
-