Skip to content

Commit 1d7dbc5

Browse files
committed
fix: layout
1 parent 5b59049 commit 1d7dbc5

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

apps/basket/src/lib/request-validation.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ export function checkForBot(
215215
botCheck.botName,
216216
clientId
217217
);
218+
setAttributes({
219+
"validation.failed": true,
220+
"validation.reason": "bot_detected",
221+
"bot.name": botCheck.botName || "unknown",
222+
"bot.category": botCheck.category || "Bot Detection",
223+
"bot.detection_reason": botCheck.reason || "unknown_bot",
224+
});
218225
return { error: { status: "ignored" } };
219226
}
220227
return;

apps/basket/src/utils/parsing-helpers.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { z } from "zod";
22
import { logBlockedTraffic } from "../lib/blocked-traffic";
3+
import { setAttributes } from "../lib/tracing";
34
import { VALIDATION_LIMITS } from "./validation";
45

56
type ParseResult<T> =
@@ -32,6 +33,11 @@ export function validateEventSchema<T>(
3233
undefined,
3334
clientId
3435
);
36+
setAttributes({
37+
"validation.failed": true,
38+
"validation.reason": "invalid_schema",
39+
"schema.error_count": parseResult.error.issues.length,
40+
});
3541
return {
3642
success: false,
3743
error: { issues: parseResult.error.issues },

apps/dashboard/app/demo/layout.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
export { default } from "@/app/(main)/layout";
1+
import { Sidebar } from "@/components/layout/sidebar";
2+
3+
export default function DemoLayout({
4+
children,
5+
}: {
6+
children: React.ReactNode;
7+
}) {
8+
return (
9+
<div className="h-screen overflow-hidden text-foreground">
10+
<Sidebar />
11+
<div className="relative h-screen pl-0 md:pl-84">
12+
<div className="h-screen overflow-y-auto overflow-x-hidden pt-16 md:pt-0">
13+
{children}
14+
</div>
15+
</div>
16+
</div>
17+
);
18+
}

0 commit comments

Comments
 (0)