yesod-core 1.6.18.4 → 1.6.18.5
raw patch · 3 files changed
+22/−1 lines, 3 files
Files
- ChangeLog.md +4/−0
- src/Yesod/Core/Types.hs +17/−0
- yesod-core.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for yesod-core +## 1.6.18.5++Document `ErrorResponse` [#1698](https://github.com/yesodweb/yesod/pull/1698)+ ## 1.6.18.4 * Fixed a bug where `mkYesod` and other TH functions didn't work for datatypes with explicitly stated type variables, including the case with typeclass constraints. [https://github.com/yesodweb/yesod/pull/1697](#1697)
src/Yesod/Core/Types.hs view
@@ -326,11 +326,28 @@ -- | Responses to indicate some form of an error occurred. data ErrorResponse = NotFound+ -- ^ The requested resource was not found.+ -- Examples of when this occurs include when an incorrect URL is used, or @yesod-persistent@'s 'get404' doesn't find a value.+ -- HTTP status: 404. | InternalError !Text+ -- ^ Some sort of unexpected exception.+ -- If your application uses `throwIO` or `error` to throw an exception, this is the form it would take.+ -- HTTP status: 500. | InvalidArgs ![Text]+ -- ^ Indicates some sort of invalid or missing argument, like a missing query parameter or malformed JSON body.+ -- Examples Yesod functions that send this include 'requireCheckJsonBody' and @Yesod.Auth.GoogleEmail2@.+ -- HTTP status: 400. | NotAuthenticated+ -- ^ Indicates the user is not logged in.+ -- This is thrown when 'isAuthorized' returns 'AuthenticationRequired'.+ -- HTTP code: 401. | PermissionDenied !Text+ -- ^ Indicates the user doesn't have permission to access the requested resource.+ -- This is thrown when 'isAuthorized' returns 'Unauthorized'.+ -- HTTP code: 403. | BadMethod !H.Method+ -- ^ Indicates the URL would have been valid if used with a different HTTP method (e.g. a GET was used, but only POST is handled.)+ -- HTTP code: 405. deriving (Show, Eq, Generic) instance NFData ErrorResponse
yesod-core.cabal view
@@ -1,5 +1,5 @@ name: yesod-core-version: 1.6.18.4+version: 1.6.18.5 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>