Class RemoteRpcException

All Implemented Interfaces:
Serializable

public final class RemoteRpcException extends RpcException
Исключение, которое наблюдает caller, когда другая сторона вернула structured remote error.

Exception observed by the caller when the remote side returned a structured error response.

See Also:
  • Constructor Details

    • RemoteRpcException

      public RemoteRpcException(int statusCode, String message)
      Создаёт remote-исключение с кодом статуса и текстом ошибки.

      Creates a remote exception with the provided status code and message.

      Parameters:
      statusCode - код статуса remote-side / remote status code
      message - remote сообщение об ошибке / remote error message
  • Method Details

    • statusCode

      public int statusCode()
      Возвращает числовой remote status code.

      Returns the remote status code.

      Returns:
      remote status code
    • status

      public RpcStatus status()
      Возвращает известный built-in статус для этого кода, если он есть.

      Returns the known transport status for this code when available.

      Returns:
      enum значение или null для custom application codes / enum value or null for custom application codes
    • isRetryable

      public boolean isRetryable()
      Возвращает, считается ли remote status retryable.

      Returns whether the remote status is known to be retryable.

      Returns:
      true when the status is retryable
    • isClientError

      public boolean isClientError()
      Возвращает, относится ли remote status к built-in client-error диапазону.

      Returns whether the remote status belongs to the built-in client-error range.

      Returns:
      true when the status is a client error
    • isServerError

      public boolean isServerError()
      Возвращает, относится ли remote status к built-in server-error диапазону.

      Returns whether the remote status belongs to the built-in server-error range.

      Returns:
      true when the status is a server error