feat: establish TypeScript-aware frontend tooling
This commit is contained in:
@@ -39,14 +39,20 @@ describe("frontend failure classification", () => {
|
||||
});
|
||||
|
||||
it("projects only allowlisted safe fields", () => {
|
||||
const result = createFailure("SERVER_FAILURE", "LIST_SAMPLE_RESOURCES", 0, {
|
||||
const untrustedDetails = {
|
||||
code: "TEMPORARY",
|
||||
httpStatus: 503,
|
||||
requestId: "request-1",
|
||||
stack: "must not leak",
|
||||
body: "must not leak",
|
||||
authorization: "Bearer secret",
|
||||
});
|
||||
};
|
||||
const result = createFailure(
|
||||
"SERVER_FAILURE",
|
||||
"LIST_SAMPLE_RESOURCES",
|
||||
0,
|
||||
untrustedDetails,
|
||||
);
|
||||
|
||||
expect(result).toMatchObject({
|
||||
kind: "SERVER_FAILURE",
|
||||
|
||||
Reference in New Issue
Block a user