Files
speckle-server/.agent/skills/api-patterns/response.md
T
huanld d1871b3979
Release pipeline / Get version (push) Has been cancelled
Release pipeline / Get Chart Name (push) Has been cancelled
Release pipeline / tests (push) Has been cancelled
Release pipeline / builds (push) Has been cancelled
Release pipeline / builds-ghcr (push) Has been cancelled
Release pipeline / test-deployments (push) Has been cancelled
Release pipeline / deploy (push) Has been cancelled
Release pipeline / Helm chart oci (push) Has been cancelled
Release pipeline / npm (push) Has been cancelled
Release pipeline / snyk (push) Has been cancelled
chore: apply viewer optimizations, tailscale networking fixes, and Dev environment configurations
2026-04-16 13:55:08 +07:00

921 B

Response Format Principles

Consistency is key - choose a format and stick to it.

Common Patterns

Choose one:
├── Envelope pattern ({ success, data, error })
├── Direct data (just return the resource)
└── HAL/JSON:API (hypermedia)

Error Response

Include:
├── Error code (for programmatic handling)
├── User message (for display)
├── Details (for debugging, field-level errors)
├── Request ID (for support)
└── NOT internal details (security!)

Pagination Types

Type Best For Trade-offs
Offset Simple, jumpable Performance on large datasets
Cursor Large datasets Can't jump to page
Keyset Performance critical Requires sortable key

Selection Questions

  1. How large is the dataset?
  2. Do users need to jump to specific pages?
  3. Is data frequently changing?