We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7564bc commit 4ec02f2Copy full SHA for 4ec02f2
solga/src/Solga.hs
@@ -42,6 +42,7 @@ module Solga
42
, SolgaError
43
, badRequest
44
, unauthorized
45
+ , forbidden
46
, notFound
47
, internalServerError
48
-- * Router implementation
@@ -374,6 +375,13 @@ unauthorized msg = SolgaError
374
375
, errorMessage = msg
376
}
377
378
+-- | Create a @403 Forbidden@ error with a given message.
379
+forbidden :: Text.Text -> SolgaError
380
+forbidden msg = SolgaError
381
+ { errorStatus = HTTP.forbidden403
382
+ , errorMessage = msg
383
+ }
384
+
385
-- | Create a @404 Not Found@ error with a given message.
386
notFound :: Text.Text -> SolgaError
387
notFound msg = SolgaError
0 commit comments