Skip to content

Commit

Permalink
chore(patch): suppress any moesif error to avoid future impact to users
Browse files Browse the repository at this point in the history
Since we can lose access to moesif at any time, this change will avoid to break every serverest run by docker or npm.
Losing all monitor from moesif without being informed is a risk that I can take.
Ensure ServeRest to run forever with old version is more important.
  • Loading branch information
PauloGoncalvesBH committed Apr 11, 2024
1 parent 06db7fe commit 5e84dc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/middlewares/moesif-monitor-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ function moesifMiddleware (req, res, next) {
noAutoHideSensitive: true
}

moesif(options)
try {
moesif(options)
} catch (error) {}
return next()
}

Expand Down

0 comments on commit 5e84dc8

Please sign in to comment.