Skip to content

Open-source status page, incident response and uptime monitoring

398 B
Raw Blame
import { z } from "zod";

export const ErrorCodes = [
  "BAD_REQUEST",
  "FORBIDDEN",
  "INTERNAL_SERVER_ERROR",
  "PAYMENT_REQUIRED",
  "CONFLICT",
  "NOT_FOUND",
  "UNAUTHORIZED",
  "METHOD_NOT_ALLOWED",
  "UNPROCESSABLE_ENTITY",
  "TOO_MANY_REQUESTS",
  "SERVICE_UNAVAILABLE",
] as const;

export const ErrorCodeEnum = z.enum(ErrorCodes);

export type ErrorCode = z.infer<typeof ErrorCodeEnum>;