notion-client
Safe HaskellNone
LanguageGHC2024

Notion.V1.Error

Contents

Description

Error handling for Notion API

Synopsis

Error types

data NotionError Source #

Notion API error response

Constructors

NotionError 

Instances

Instances details
Exception NotionError Source # 
Instance details

Defined in Notion.V1.Error

Generic NotionError Source # 
Instance details

Defined in Notion.V1.Error

Associated Types

type Rep NotionError 
Instance details

Defined in Notion.V1.Error

Show NotionError Source # 
Instance details

Defined in Notion.V1.Error

FromJSON NotionError Source # 
Instance details

Defined in Notion.V1.Error

ToJSON NotionError Source # 
Instance details

Defined in Notion.V1.Error

type Rep NotionError Source # 
Instance details

Defined in Notion.V1.Error

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.