Skip to content

Commit

Permalink
Merge pull request #1929 from digitallyinduced/track-exceptions-only-…
Browse files Browse the repository at this point in the history
…in-prod

Only track exception (e.g. with sentry) in production
  • Loading branch information
mpscholten authored Mar 12, 2024
2 parents c526aeb + 779144d commit d4e8d1f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions IHP/ErrorController.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ displayException exception action additionalInfo = do
-- to the error tracking service (e.g. sentry). Usually this service also writes
-- the error message to the stderr output
--
let exceptionTracker = ?applicationContext.frameworkConfig.exceptionTracker.onException
let request = ?requestContext.request
when (?context.frameworkConfig.environment == Environment.Production) do
let exceptionTracker = ?applicationContext.frameworkConfig.exceptionTracker.onException
let request = ?requestContext.request


exceptionTracker (Just request) exception
exceptionTracker (Just request) exception

supportingHandlers
|> head
Expand Down

0 comments on commit d4e8d1f

Please sign in to comment.