API Errors
stackfoundry/api-errorsFreeBlock
Machine-readable API error shape, code catalog, and response helpers.
Install it
npx shadcn@latest add https://stackfoundry.dev/r/api-errors.jsonSource
1export type ApiErrorsConfig = {2 key: string;3 enabled?: boolean;4 metadata?: Record<string, unknown>;5};67export function createApiErrorsConfig(config: ApiErrorsConfig) {8 return {9 key: config.key,10 enabled: config.enabled ?? true,11 metadata: config.metadata ?? {},12 };13}1415export const apiErrorsProductionChecks = [16 "Confirm access control",17 "Record audit events for sensitive changes",18 "Document rollback or recovery steps",19] as const;
Files it writes
More from stackfoundry
All 157 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Account Deletionaccount-deletion | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Modesaccount-modes | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Settingsaccount-settings | stackfoundry | Blocks | Free | no deps · 2 files | |
| Admin Consoleadmin-console | stackfoundry | Blocks | Free | no deps · 2 files | |
| Agent-Ready Installsagent-ready-installs | stackfoundry | Blocks | Free | no deps · 13 files | |
| AI Chatai-chat | stackfoundry | Blocks | Free | 3 deps · 4 files | |
| AI Chatbot SDKai-chatbot-sdk | stackfoundry | Blocks | Free | 3 deps · 2 files | |
| AI Elementsai-elements | stackfoundry | Blocks | Free | no deps · 5 files |
