fix: report error only when enabled
parent
8b0cec8678
commit
c2a0443486
|
@ -10,7 +10,7 @@ const log = debug('fcc:middlewares:error-reporter');
|
||||||
|
|
||||||
const isOpbeatDisabled = !opbeat.appId;
|
const isOpbeatDisabled = !opbeat.appId;
|
||||||
export default function errrorReporter() {
|
export default function errrorReporter() {
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production' && process.env.ERROR_REPORTER) {
|
||||||
return (err, req, res, next) => {
|
return (err, req, res, next) => {
|
||||||
if (isHandledError(err)) {
|
if (isHandledError(err)) {
|
||||||
// log out user messages in development
|
// log out user messages in development
|
||||||
|
|
Loading…
Reference in New Issue