接口 ModelHttpException


public interface ModelHttpException
Exception contract for model providers that can expose an HTTP status code.

This keeps retry classification provider-neutral while allowing extension modules to preserve provider-specific exception types.

  • 方法概要

    修饰符和类型
    方法
    说明
    Returns the HTTP status code associated with the model failure.
    default boolean
    Returns whether this HTTP status is retryable by default.
  • 方法详细资料

    • getStatusCode

      Integer getStatusCode()
      Returns the HTTP status code associated with the model failure.
      返回:
      HTTP status code, or null when no status code is available
    • isRetryableHttpStatus

      default boolean isRetryableHttpStatus()
      Returns whether this HTTP status is retryable by default.

      Rate limiting (429) and server errors (5xx) are considered retryable.

      返回:
      true if the status code should be retried