mirror of
https://github.com/strapi/strapi.git
synced 2025-09-03 05:39:36 +00:00
adding Strapi environment to Sentry error
and a reminder to actually install the package
This commit is contained in:
parent
fc7e6d5f00
commit
f213ed8a6a
@ -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://<key>@sentry.io/<project>' });
|
||||
Sentry.init({
|
||||
dsn: 'https://<key>@sentry.io/<project>',
|
||||
environment: strapi.config.environment
|
||||
});
|
||||
|
||||
module.exports = strapi => {
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user