Exception: DurableHuggingfaceHub::InferenceEndpointError

Inherits:
HfHubHTTPError show all
Defined in:
lib/durable_huggingface_hub/errors.rb

Overview

Error raised when an inference endpoint returns an error.

Examples:

raise InferenceEndpointError.new("Model not loaded", status_code: 503)

Instance Attribute Summary

Attributes inherited from HfHubHTTPError

#request_id, #response_body, #server_message, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message, status_code: nil, response_body: nil) ⇒ InferenceEndpointError

Creates a new inference endpoint error.

Parameters:

  • message (String)

    Error message

  • status_code (Integer, nil) (defaults to: nil)

    HTTP status code

  • response_body (String, nil) (defaults to: nil)

    Response body



368
369
370
# File 'lib/durable_huggingface_hub/errors.rb', line 368

def initialize(message, status_code: nil, response_body: nil)
  super(message, status_code: status_code, response_body: response_body)
end