Improvement to error handling for Augmentors

Created on 27 November 2023, 12 months ago
Updated 27 March 2024, 8 months ago

Problem/Motivation

Augmentors need to be resilient to errors. Errors can happen in two places:

  • Individual plugins may face issues when accessing endpoints
  • The Widgets which rely on the execute endpoint may in turn receive errors.

The first set of errors can be best handled by conducting a standard set of checks:

  • The plugin is propoerly configured
  • The input is complete
  • The response has not timed out
  • The response is 200
  • The payload is complete and correct
  • The payload doesn't itself contain an error message
  • The payloads maps properly to the output data structure

If there are problems with any of these, an error should be returned in the execute response. Each of the main plugins should be chgecked to ensure that there is robustness as per above.

For the widgets, and anything else which consumes the execute endpoint, a similar set of steps needs to be taken.

  • The response has not timed out
  • The response is 200
  • The payload is complete and correct
  • The payload doesn't itself contain an error message

It is vitally important that the widget (field, wysiwyg) only takes action if all of the above steps are correct and there is good data present to work on.

As this ticket is for Augmentor, it can focus on the second issue. ie. it is handling the execute in a safe way.

Steps to reproduce

Via code, try to set a wrong endpoint and see how the Augmentor handles the error.
An human readable error should be returned to the user.
There should be no JS errors.
Users should be able to interact with the page.

Proposed resolution

Make the code more defensive.

🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇮🇳India abhisekmazumdar India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024