feat(api): Implement rate limiting
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 42s
Build Docker Images / lint (push) Successful in 31s
Build Docker Images / check (push) Successful in 1m3s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 13s
Mirror to Codeberg / Mirror (push) Failing after 0s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Nix Build / check (push) Failing after 33m18s

This commit is contained in:
Jesse Wierzbinski 2025-03-27 20:12:00 +01:00
parent 1993231663
commit 3d3e64edab
No known key found for this signature in database
15 changed files with 76 additions and 3 deletions

View file

@ -27,7 +27,10 @@ export class ApiError extends Error {
public static zodSchema = z.object({
error: z.string(),
details: z.string().or(z.record(z.string(), z.string())).optional(),
details: z
.string()
.or(z.record(z.string(), z.string().or(z.number())))
.optional(),
});
public get schema(): ResponseConfig {