Enum Class HttpResultCode

java.lang.Object
java.lang.Enum<HttpResultCode>
ru.tinkoff.kora.http.common.HttpResultCode
All Implemented Interfaces:
Serializable, Comparable<HttpResultCode>, Constable

public enum HttpResultCode extends Enum<HttpResultCode>
  • Enum Constant Details

    • SUCCESS

      public static final HttpResultCode SUCCESS
      success - всё завершилось успешно
    • LIMIT_ERROR

      public static final HttpResultCode LIMIT_ERROR
      limit_error - ошибки лимитов, обычно код 429
    • AUTH_ERROR

      public static final HttpResultCode AUTH_ERROR
      auth_error - ошибка авторизации, обычно коды 401 и 403
    • CLIENT_ERROR

      public static final HttpResultCode CLIENT_ERROR
      client_error - ошибки клиента, когда клиент не смог обработать ответ (4xx ответы)
    • SERVER_ERROR

      public static final HttpResultCode SERVER_ERROR
      server_error - когда клиент не смог обработать запрос по вине сервера (5xx ответы)
    • CONNECTION_ERROR

      public static final HttpResultCode CONNECTION_ERROR
      connection_error - ошибки возникающие, когда ответ вообще не получен: переполнения пулов, таймауты на сети, etc.
  • Method Details

    • values

      public static HttpResultCode[] 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 HttpResultCode 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
    • fromStatusCode

      public static HttpResultCode fromStatusCode(int code)
    • string

      public String string()