Skip to content

ExecuteAbilityAbility returns incompatible error format with ToolsHandler causing generic error messages #89

@priethor

Description

@priethor

In v0.3.0, ExecuteAbilityAbility returns error messages in a format that ToolsHandler cannot parse, causing all error messages from ExecuteAbilityAbility to be replaced with the generic fallback: "An error occurred while executing the tool."

It seems that ExecuteAbilityAbility.php returns errors as:

 array(
      'success' => false,
      'error'   => 'Error message string'
  )

But ToolsHandler.php expects errors in this format:

  array(
      'error' => array(
          'message' => 'Error message'
      )
  )

As seen here in the default fallback message triggering here:

$error_message = $result['error']['message'] ?? 'An error occurred while executing the tool.';

Steps to reproduce

  1. Call any ability that returns an error, like an outpu validation error
  2. See that instead of the actual error message, you get the generic message

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions