Document ErrorResponse
This commit is contained in:
parent
de45bc0d27
commit
067914aac0
@ -1,5 +1,9 @@
|
|||||||
# ChangeLog for yesod-core
|
# ChangeLog for yesod-core
|
||||||
|
|
||||||
|
## 1.6.18.5
|
||||||
|
|
||||||
|
Document `ErrorResponse` []()
|
||||||
|
|
||||||
## 1.6.18.4
|
## 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)
|
* 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)
|
||||||
|
|||||||
@ -326,11 +326,28 @@ newtype DontFullyEvaluate a = DontFullyEvaluate { unDontFullyEvaluate :: a }
|
|||||||
-- | Responses to indicate some form of an error occurred.
|
-- | Responses to indicate some form of an error occurred.
|
||||||
data ErrorResponse =
|
data ErrorResponse =
|
||||||
NotFound
|
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
|
| 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]
|
| 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
|
| NotAuthenticated
|
||||||
|
-- ^ Indicates the user is not logged in.
|
||||||
|
-- This is thrown when 'isAuthorized' returns 'AuthenticationRequired'.
|
||||||
|
-- HTTP code: 401.
|
||||||
| PermissionDenied !Text
|
| 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
|
| 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)
|
deriving (Show, Eq, Generic)
|
||||||
instance NFData ErrorResponse
|
instance NFData ErrorResponse
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-core
|
name: yesod-core
|
||||||
version: 1.6.18.4
|
version: 1.6.18.5
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user