Exception: Embedding::Gemini::TransientApiError

Inherits:
ApiError
  • Object
show all
Defined in:
app/services/embedding/gemini.rb

Overview

Service object: transient API error — a 5xx from Gemini, which says
nothing about our request and usually succeeds on the next attempt.

It exists so 5xx can enter RETRYABLE_EXCEPTIONS without dragging the rest
of ApiError in with it: "No embedding values in response", a batch-count
mismatch and a missing batch slot are all response-SHAPE faults that would
fail identically five times over. Subclasses ApiError, so every existing
rescue ApiError still catches a 5xx exactly as before.