@@ -262,6 +262,108 @@ export namespace CloudEnvironmentConfig {
262262 }
263263}
264264
265+ /**
266+ * Error response following RFC 7807 (Problem Details for HTTP APIs). Includes
267+ * backward-compatible extension members.
268+ *
269+ * The response uses the `application/problem+json` content type. Additional
270+ * extension members (e.g., `auth_url`, `provider`) may be present depending on the
271+ * error code.
272+ */
273+ export interface Error {
274+ /**
275+ * Human-readable error message combining title and detail. Backward-compatible
276+ * extension member for older clients.
277+ */
278+ error : string ;
279+
280+ /**
281+ * The HTTP status code for this occurrence of the problem (RFC 7807)
282+ */
283+ status : number ;
284+
285+ /**
286+ * A short, human-readable summary of the problem type (RFC 7807)
287+ */
288+ title : string ;
289+
290+ /**
291+ * A URI reference that identifies the problem type (RFC 7807). Format:
292+ * `https://docs.warp.dev/agent-platform/troubleshooting/errors/{error_code}` See
293+ * PlatformErrorCode for the list of possible error codes.
294+ */
295+ type : string ;
296+
297+ /**
298+ * A human-readable explanation specific to this occurrence of the problem
299+ * (RFC 7807)
300+ */
301+ detail ?: string ;
302+
303+ /**
304+ * The request path that generated this error (RFC 7807)
305+ */
306+ instance ?: string ;
307+
308+ /**
309+ * Whether the request can be retried. When true, the error is transient and the
310+ * request may be retried. When false, retrying without addressing the underlying
311+ * cause will not succeed.
312+ */
313+ retryable ?: boolean ;
314+
315+ /**
316+ * OpenTelemetry trace ID for debugging and support requests
317+ */
318+ trace_id ?: string ;
319+ }
320+
321+ /**
322+ * Machine-readable error code identifying the problem type. Used in the `type` URI
323+ * of Error responses and in the `error_code` field of RunStatusMessage.
324+ *
325+ * User errors (run transitions to FAILED):
326+ *
327+ * - `insufficient_credits` — Team has no remaining add-on credits
328+ * - `feature_not_available` — Required feature not enabled for user's plan
329+ * - `external_authentication_required` — User hasn't authorized a required
330+ * external service
331+ * - `not_authorized` — Principal lacks permission for the requested operation
332+ * - `invalid_request` — Request is malformed or contains invalid parameters
333+ * - `resource_not_found` — Referenced resource does not exist
334+ * - `budget_exceeded` — Spending budget limit has been reached
335+ * - `integration_disabled` — Integration is disabled and must be enabled
336+ * - `integration_not_configured` — Integration setup is incomplete
337+ * - `operation_not_supported` — Requested operation not supported for this
338+ * resource/state
339+ * - `environment_setup_failed` — Client-side environment setup failed
340+ * - `content_policy_violation` — Prompt or setup commands violated content policy
341+ * - `conflict` — Request conflicts with the current state of the resource
342+ *
343+ * Warp errors (run transitions to ERROR):
344+ *
345+ * - `authentication_required` — Request lacks valid authentication credentials
346+ * - `resource_unavailable` — Transient infrastructure issue (retryable)
347+ * - `internal_error` — Unexpected server-side error (retryable)
348+ */
349+ export type ErrorCode =
350+ | 'insufficient_credits'
351+ | 'feature_not_available'
352+ | 'external_authentication_required'
353+ | 'not_authorized'
354+ | 'invalid_request'
355+ | 'resource_not_found'
356+ | 'budget_exceeded'
357+ | 'integration_disabled'
358+ | 'integration_not_configured'
359+ | 'operation_not_supported'
360+ | 'environment_setup_failed'
361+ | 'content_policy_violation'
362+ | 'conflict'
363+ | 'authentication_required'
364+ | 'resource_unavailable'
365+ | 'internal_error' ;
366+
265367/**
266368 * Configuration for an MCP server. Must have exactly one of: warp_id, command, or
267369 * url.
@@ -543,6 +645,8 @@ export declare namespace Agent {
543645 type AgentSkill as AgentSkill ,
544646 type AmbientAgentConfig as AmbientAgentConfig ,
545647 type CloudEnvironmentConfig as CloudEnvironmentConfig ,
648+ type Error as Error ,
649+ type ErrorCode as ErrorCode ,
546650 type McpServerConfig as McpServerConfig ,
547651 type Scope as Scope ,
548652 type UserProfile as UserProfile ,
0 commit comments