import { describe, expect, it } from "vitest";

import { problemDetailsSchema } from "./error";

describe("problemDetailsSchema", () => {
  it("accepts RFC 7807 problem details", () => {
    const result = problemDetailsSchema.safeParse({
      type: "https://example.com/errors/validation",
      title: "Validation failed",
      status: 400,
      detail: "Invalid input",
      instance: "/api/v1/servers",
    });
    expect(result.success).toBe(true);
  });
});
