// the api's error-code vocabulary: every code-shaped HTTPException message
// the server throws (enforced by api/src/error-codes.test.ts; dev-only fault
// injection is excluded there). the client keys friendly copy off these, so
// a renamed code is a type error there instead of a silently generic toast
export const API_ERROR_CODES = [
  'already_friends',
  'already_in_trail',
  'already_invited',
  'already_member',
  'already_requested',
  'cannot_block_self',
  'cannot_dm_self',
  'cannot_friend_self',
  'cannot_invite_self',
  'decode_failed',
  'empty_body',
  'forbidden',
  'handle_taken',
  'id_taken',
  'image_too_large',
  'invalid_code',
  'invalid_event',
  'invalid_llm_key',
  'invalid_place',
  'invalid_request',
  'invalid_source',
  'invalid_url',
  'llm_malformed_output',
  'llm_rate_limited',
  'llm_unavailable',
  'missing_llm_key',
  'not_found',
  'not_friends',
  'remind_at_in_past',
  'too_large',
  'too_many_requests',
  'unreachable_url',
  'unresolvable_url',
  'unsupported_image_type',
  'unsupported_type',
  'unsupported_url',
  'upstream_error',
] as const

export type ApiErrorCode = (typeof API_ERROR_CODES)[number]
