| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Notion.V1.Error
Contents
Description
Error handling for Notion API
Synopsis
- data NotionError = NotionError {}
- parseNotionError :: ClientError -> Maybe NotionError
Error types
data NotionError Source #
Notion API error response
Constructors
| NotionError | |
Instances
parseNotionError :: ClientError -> Maybe NotionError Source #
Try to parse a NotionError from a Servant ClientError.
Returns Just if the error is a FailureResponse with a JSON body
that can be decoded as a NotionError. Returns Nothing for network errors,
non-JSON responses, or responses that don't match the Notion error format.