fbmessenger-api-0.1.1.1: High-level bindings to Facebook Messenger Platform API

LicenseBSD3
MaintainerMarcello Seri <marcello.seri@gmail.com>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Web.FBMessenger.API.Bot.Responses

Contents

Description

This module contains types and helpers to parse the responses from the Messenger Platform API. See also SendAPI.

Synopsis

Types

data SendErrorCode Source

Send API Error Codes (see: https://developers.facebook.com/docs/messenger-platform/send-api-reference#errors)

Code Description 2 Send message failure. Internal server error. 10 Application does not have permission to use the Send API 100 No matching user found 613 Calls to this api have exceeded the rate limit.

Functions

errorInfo :: SendErrorObject -> (SendErrorCode, Text) Source

Take a Send API error object and return a tuple containing the error code and the error_data (seems to always be the description)

extractSendError :: ServantError -> Maybe SendErrorObject Source

Extracts a Send API Error object from the ServantError (when possible).