协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
canva-common-errors【开发与工程】Analyze and classify Canva Connect failures by HTTP status, provider error code, operation, and authorization state. Use when deciding whether to refresh, reauthorize, wait, reconcile, correct input, or escalate. Trigger with: "Canva API error", "Canva 401", "Canva 403 or 429".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: canva-common-errors description: 'Analyze and classify Canva Connect failures by HTTP status, provider error code, operation, and authorization state. Use when deciding whether to refresh, reauthorize, wait, reconcile, correct input, or escalate. Trigger with: "Canva API error", "Canva 401", "Canva 403 or 429".' allowed-tools: Read, Grep, Write, Edit version: 2.0.0 argument-hint: '[status-code-and-redacted-error]' model: inherit effort: high license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
Treat HTTP status alone as insufficient. Use the current endpoint reference and redacted provider error code to separate caller defects, authorization failures, throttling, preview drift, and provider incidents.
Record method, endpoint pattern, status, provider code, terminal job state, retry metadata if actually present, and deployment version. Exclude tokens, bodies, signed URLs, and customer identifiers.
For an invalid or expired access token, serialize the authorized refresh flow and atomically store the replacement refresh token. Reauthorize after revocation or unrecoverable refresh failure.
Compare the operation with explicit granted scopes, resource ownership, capabilities, tenant policy, and preview availability. Never assume a write scope grants its read counterpart.
Pause only the affected endpoint/user queue. Use documented endpoint metadata and response instructions; otherwise apply bounded exponential backoff with jitter rather than a guessed fixed delay.
Poll the existing job to a documented terminal state. Correct validation or entitlement errors before any new submission.
Correlate repeated server errors with Canva status/changelog and provide a redacted support receipt after bounded retry is exhausted.
Canva Connect calls use Bearer access tokens obtained by a backend through OAuth 2.0 Authorization Code with SHA-256 PKCE. Request explicit least-privilege scopes, keep client secrets and tokens out of browser-visible state, and serialize refresh so the replacement single-use refresh token is stored atomically.
Use Read and Grep for discovery and evidence. Use Write or Edit only for the approved artifact, code, configuration, test, or receipt described by this workflow; do not make an unapproved Canva-side change.
An autofill returns HTTP 403. The operator checks explicit scopes, current capability and Enterprise availability, template ownership, preview status, and the provider error before deciding whether reauthorization is relevant.
| Failure | Response |
|---|---|
| Only HTTP status is available | Collect the redacted provider envelope before acting |
| Refresh repeats 401 | Stop and require reauthorization instead of looping |
| 429 has no retry metadata | Use the local bounded backoff policy and lower concurrency |
| Job failed validation | Correct the request; do not retry unchanged input |