Skip to content

Commit 3d19ebf

Browse files
Alex KrawiecAlex Krawiec
authored andcommitted
Fix some formatting errors
1 parent 9036d8f commit 3d19ebf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/product/sentry-basics/distributed-tracing/generate-first-error.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ If you're using your own source code, skip this step. Instead, select your [plat
3030
```
3131
Take note that in the `server.js` file of the `tracing-tutorial-backend` repo, there is a middleware function handling the `/products/debug-sentry` route, which throws a sample error:
3232

33-
```javascript{filename:server.js}
33+
```javascript {filename:server.js}
3434
app.get("/products/debug-sentry", (req, res) => {
3535
console.log('Sentry Error thrown!');
3636
throw new Error("My first Sentry error!");

docs/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-backend.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The options set in `Sentry.init()` are called the SDK's configuration. The only
9292

9393
The configuration above enables Sentry's error monitoring feature, as well as its [Performance](/platforms/javascript/guides/react/performance) (tracing) and [Session Replay](/platforms/javascript/guides/react/session-replay) features.
9494

95-
Make sure to import `instrument.js` at the top of your `server.js` file, and set up the error handler after all controllers and before any other middleware:
95+
Make sure to import `instrument.js` at the top of your `server.js` file, as well as importing `Sentry` and setting up the error handler after all controllers and before any other middleware:
9696

9797
``` javascript {filename:server.js}
9898
// IMPORTANT: Make sure to import `instrument.js` at the top of your file.
@@ -115,6 +115,11 @@ Make sure to import `instrument.js` at the top of your `server.js` file, and set
115115
res.send('<h1>Hello, Express.js Server here!</h1>');
116116
});
117117

118+
app.get("/products/debug-sentry", (req, res) => {
119+
console.log("Sentry Error thrown!");
120+
throw new Error("My first Sentry error!");
121+
});
122+
118123
// The error handler must be registered before any other error middleware and after all controllers
119124
Sentry.setupExpressErrorHandler(app);
120125

0 commit comments

Comments
 (0)