Skip to content

Commit 79bb7cc

Browse files
author
Shannon Anahata
committed
fixed snippet to be cloudflare specific
1 parent 13c6c87 commit 79bb7cc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

platform-includes/getting-started-config/javascript.cloudflare.workers.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Wrap your worker handler with the `withSentry` function, for example, in your `index.ts` file, to initialize the Sentry SDK and hook into the environment:
22

33
```typescript {filename:index.ts}
4-
import { Hono, HTTPException } from "hono";
54
import * as Sentry from "@sentry/cloudflare";
65

76
export default Sentry.withSentry(
@@ -30,7 +29,11 @@ export default Sentry.withSentry(
3029
// ___PRODUCT_OPTION_END___ performance
3130
};
3231
},
33-
// your existing worker export
34-
app
32+
{
33+
async fetch(request, env, ctx) {
34+
// Your worker logic here
35+
return new Response("Hello World!");
36+
},
37+
}
3538
);
3639
```

0 commit comments

Comments
 (0)