Class UnauthorizedResponseMetadata

java.lang.Object
com.mulesoft.modules.agent.broker.internal.util.UnauthorizedResponseMetadata

public class UnauthorizedResponseMetadata extends Object
HTTP-style response metadata (status and Retry-After) extracted from Mule error structures.
  • Field Details

  • Method Details

    • extractMetadata

      public static UnauthorizedResponseMetadata extractMetadata(Throwable throwable)
      Builds UnauthorizedResponseMetadata from the first ErrorMessageAwareException in throwable's cause tree (including suppressed exceptions), when both status code and Retry-After can be read from message attributes.
      Parameters:
      throwable - the error to inspect; may be null
      Returns:
      populated metadata, or null when nothing could be extracted
    • getStatusCode

      public Integer getStatusCode()
    • getRetryAfter

      public Integer getRetryAfter()