Error envelope
Every non-2xx response from fetchbean looks like this:Error types
Codes worth handling
A fewcode values inside those types come up often enough to branch on directly:
Handling errors
Branch ontype for the main decision logic, and use code when you need to handle a specific failure scenario. Use the retryable flag to determine whether a retry is appropriate:
You are never charged for
provider or timeout errors. Their billable field is false. normalization is the exception: the provider call succeeded and cost real money, but fetchbean could not map its result to the curated shape. Fall back to POST /v1/run to get the registered operation’s provider-specific result.billable rather than inferring from the status code. Admission checks the call’s upfront hold against the available balance and monthly cap. A metered call’s final charge can exceed that hold, the remaining balance, or the cap after admission.
