From 173e864f30b45fe72cb1a6de7ce4d6c57f105c74 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 11 May 2024 20:19:17 +0200 Subject: refactor(users/Profpatsch/whatcd-resolver): fix respond warning Change-Id: Ie833b611d1ad413b03465caa38e4ee2c1deb9a37 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11644 Autosubmit: Profpatsch Tested-by: BuildkiteCI Reviewed-by: Profpatsch --- users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'users/Profpatsch/whatcd-resolver/src') diff --git a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs index d8873ebb5760..9aa8233f571e 100644 --- a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs +++ b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs @@ -84,13 +84,13 @@ htmlUi = do () (Dec.fromField @Text) - withRunInIO $ \runInIO -> Warp.run 9093 $ \req respond -> do + withRunInIO $ \runInIO -> Warp.run 9093 $ \req respondOrig -> do let catchAppException act = try act >>= \case Right a -> pure a Left (AppException err) -> do runInIO (logError err) - respond (Wai.responseLBS Http.status500 [] "") + respondOrig (Wai.responseLBS Http.status500 [] "") catchAppException $ do let mp span parser = @@ -233,7 +233,7 @@ htmlUi = do (\respond -> respond.html $ (mainHtml uniqueRunId)) handlers req - respond + respondOrig where everySecond :: Text -> Enc -> Html -> Html everySecond call extraData innerHtml = [hsx|
{innerHtml}
|] -- cgit 1.4.1