style: format code biome
Local Build and Deploy / deploy (push) Failing after 46s

This commit is contained in:
openhands committed 2026-07-13 21:57:41 +02:00
1 parent 8efd032cc6
commit df38dccbf1
735 files changed
+128321 -120870

No files matched your search

+27 -25
View File
@@ -2,30 +2,32 @@ import { describe, expect, it } from "vitest";
import { serverErrorRecord } from "@/lib/server-log";
describe("serverErrorRecord", () => {
it("keeps operational context while redacting sensitive fields", () => {
expect(
serverErrorRecord("paypal.capture_failed", new Error("gateway timeout"), {
orderId: "ORDER-123",
userId: 42,
authorization: "Bearer secret",
apiToken: "secret-token",
}),
).toEqual({
level: "error",
event: "paypal.capture_failed",
message: "gateway timeout",
context: {
orderId: "ORDER-123",
userId: 42,
authorization: "[REDACTED]",
apiToken: "[REDACTED]",
},
});
});
it("keeps operational context while redacting sensitive fields", () => {
expect(
serverErrorRecord("paypal.capture_failed", new Error("gateway timeout"), {
orderId: "ORDER-123",
userId: 42,
authorization: "Bearer secret",
apiToken: "secret-token",
}),
).toEqual({
level: "error",
event: "paypal.capture_failed",
message: "gateway timeout",
context: {
orderId: "ORDER-123",
userId: 42,
authorization: "[REDACTED]",
apiToken: "[REDACTED]",
},
});
});
it("normalizes non-Error failures without serializing arbitrary objects", () => {
expect(serverErrorRecord("admin.update_failed", { password: "secret" })).toMatchObject({
message: "Unknown server error",
});
});
it("normalizes non-Error failures without serializing arbitrary objects", () => {
expect(
serverErrorRecord("admin.update_failed", { password: "secret" }),
).toMatchObject({
message: "Unknown server error",
});
});
});