Member Junction
    Preparing search index...
    • Classify an error thrown by a vendor call into the kind that drives engine failover.

      The distinction is about the request, not the vendor: a 400/422 normally means this query is malformed and every other provider will reject it too, so the engine must stop rather than spend four more paid calls learning the same thing. Everything else — auth, quota, 5xx, timeouts — is specific to this vendor and another may well succeed.

      A missing or invalid API key is deliberately transient in that sense: the request is fine, this provider just cannot serve it, so moving on is exactly right.

      Status alone does not decide that, which is why a 400 is inspected before it is trusted. Google Custom Search answers an invalid key with HTTP 400 (reason: keyInvalid), not 401 — so classifying by status alone made a dead Google key stop the whole run, on precisely the vendor whose keys are expected to stop working when the API is discontinued on 2027-01-01. Perplexity answers the same condition with 401 and failed over correctly, which is what made the inconsistency easy to miss.

      Parameters

      • error: unknown
      • vendor: string

      Returns WebSearchProviderResponse