From f213ed8a6ac49f5c2ec2f85507992b39e9f8d813 Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Date: Tue, 5 Nov 2019 11:16:20 +0100 Subject: [PATCH] adding Strapi environment to Sentry error and a reminder to actually install the package --- docs/3.0.0-beta.x/guides/error-catching.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/3.0.0-beta.x/guides/error-catching.md b/docs/3.0.0-beta.x/guides/error-catching.md index 077c9a953a..f2ceeb3fc8 100644 --- a/docs/3.0.0-beta.x/guides/error-catching.md +++ b/docs/3.0.0-beta.x/guides/error-catching.md @@ -28,7 +28,7 @@ module.exports = strapi => { ## Handle errors -Here is the [Node.js client documentation](https://docs.sentry.io/platforms/node/) +Here is the [Node.js client documentation](https://docs.sentry.io/platforms/node/). Install it with `yarn add @sentry/node` or `npm install @sentry/node --save`. - Now add the logic that will catch errors. @@ -36,7 +36,10 @@ Here is the [Node.js client documentation](https://docs.sentry.io/platforms/node ```js const Sentry = require('@sentry/node'); -Sentry.init({ dsn: 'https://@sentry.io/' }); +Sentry.init({ + dsn: 'https://@sentry.io/', + environment: strapi.config.environment +}); module.exports = strapi => { return {