Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

384 B
Raw Blame
import { expect } from "vite-plus/test";

export type ApiErrorBody = {
  message: string;
  code: string;
  issues?: Array<{ path: string; message: string }>;
  missingPermissions?: string[];
};

export async function readErrorBody(response: Response) {
  expect(response.headers.get("content-type")).toContain("application/json");
  return (await response.json()) as ApiErrorBody;
}