constellation icon indicating copy to clipboard operation
constellation copied to clipboard

Use of `PluginParameter.isRequired` in the Plugin Framework for better error handling

Open Auriga2 opened this issue 2 years ago • 5 comments

Prerequisites

  • [x] Put an X between the brackets on this line if you have done all of the following:

    • Running the latest version of Constellation

    • Attached the Support Package via Help > Support Package

    • Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ

    • Checked that your issue isn’t already filed: https://github.com/constellation-app/constellation/issues

    • Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories

Description

When certain plugins are executed through the run_plugins or run_plugins end points in the REST API , exceptions are thrown if certain parameters are missing.: E.g.: image

The PluginParameter.isRequired could be backed into the Plugin Framework code so that even before the plugin runs, it will check this and throw a PluginException for missing required parameters. In theory that should mean that it will work "automatically" from the DAV, running from the Actions, Scripting View, Rest API and Notebook.

Note that this will only check the existence of some parameters and the specific checks still need to be handled in the plugins. E.g., In the DAV, if the Duplicate Transactions check box is checked the Transaction Type disables, so we cannot set Transaction Type as required, although it's required when the check box above is unticked. image

Steps to Reproduce

As stated above

Expected behaviour: No exceptions are thrown

Actual behaviour: Exceptions are thrown as stated above

Reproduces how often: 100%

Additional Information

Plugin parameter isRequired property is added in https://github.com/constellation-app/constellation/pull/1467

Auriga2 avatar Oct 12 '21 02:10 Auriga2

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar May 18 '22 00:05 github-actions[bot]

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Nov 30 '22 00:11 github-actions[bot]

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar May 31 '23 00:05 github-actions[bot]

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Dec 03 '23 00:12 github-actions[bot]