PotatoApiError for failed HTTP responses and polling timeouts. Network errors, credential callback errors, and local argument errors can be other error types.
This example calls client.me() using the client.ts module from the quickstart.
PotatoApiError
The HTTP message does not include the response body. Inspect
body, whose type is unknown, for the platform’s explanation. Quote requestId when reporting a failed request.
Respond to HTTP failures
Use HTTP API troubleshooting for specific messages, and client request behavior for rate-limit handling.
Handle a wait timeout
SetTOLOKA_EXPORT_ID to the export ID returned by datasets.startExport in the quickstart. This resumes waiting for that export. A timeout stops polling but leaves the job running; retain the ID to check it again.
PipelineGraphValidationError
validate(graph) throws PipelineGraphValidationError when a graph fails the local graph schema or supported entity checks. It exposes code: "invalid_pipeline_graph" and issues, an array of { path, reason }. Its message starts with Pipeline graph validation failed and lists the issues.
validatePipelineDefinition and resolvePipelineDefinition also call validate. The CLI loads pipeline source through validatePipelineDefinition, so the same error can surface when loading a project.
definePipeline and invalid condition names in match throw ordinary errors. A graph rejected by an HTTP write is a PotatoApiError; local validation errors do not represent an HTTP response.