FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/ant-design / createOnErrorHandler

Function: createOnErrorHandler()

createOnErrorHandler(messageApi): (action) => (res) => Promise<void>

Create the default FaasJS request error handler used by App.

The handler ignores aborted requests, logs other failures with the action path, and shows the normalized message through Ant Design's message API.

Parameters

messageApi

Ant Design message API subset used to show errors.

error

(message) => void

Returns

Error handler factory compatible with FaasReactClientOptions.onError.

(action) => (res) => Promise<void>