atagen

malice

public
Star0
Watch0
48af827771081b0e3b68719cf046485aaab65304
2
ssh://brewery@pls.lobotomise.me:33/atagen/malice.git
web/src/lib/wire-status.tsTypescript18 lines385 B
1
export const STATUS_BY_KIND: Record<string, number> = {
2
  bad_request: 400,
3
  not_found: 404,
4
  conflict: 409,
5
  busy: 429,
6
  too_large: 413,
7
  unsupported: 415,
8
  engine_stopped: 502,
9
  upstream: 502,
10
  unauthorized: 401,
11
  forbidden: 403,
12
  store_in_use: 409,
13
  key_backup_exists: 409
14
};
15
16
export function statusForKind(kind: string): number {
17
  return STATUS_BY_KIND[kind] ?? 502;
18
}