summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Url.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs
index e1a21af5d..e6dcd3388 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -27,6 +27,7 @@ module Utility.Url (
downloadQuiet,
parseURIRelaxed,
matchStatusCodeException,
+ matchHttpExceptionContent,
) where
import Common
@@ -365,3 +366,9 @@ matchStatusCodeException want e@(StatusCodeException s _ _)
| otherwise = Nothing
matchStatusCodeException _ _ = Nothing
#endif
+
+matchHttpExceptionContent :: (HttpExceptionContent -> Bool) -> HttpException -> Maybe HttpException
+matchHttpExceptionContent want e@(HttpExceptionRequest _ hec)
+ | want hec = Just e
+ | otherwise = Nothing
+matchHttpExceptionContent _ _ = Nothing