Skip to content

Commit

Permalink
Only track exception (e.g. with sentry) in production
Browse files Browse the repository at this point in the history
This was the expected behaviour, but turns out I missed one place
  • Loading branch information
mpscholten committed Mar 12, 2024
1 parent c526aeb commit 779144d
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 779144d

Please sign in to comment.