Skip to content

Error handling improvements #7

@Hamish-taylor

Description

@Hamish-taylor

Dedicated error class for action return types

Action handlers must return ActionResult objects currently. When an action result is returned, the SDK validates that the expected properties (as defined by the actions’ output schema in config.json) are returned by each action. This causes some friction when attempting to return error messages inside the ActionResult return since the schema only accounts for a successful execution scenario.

Providing an ActionError return type could address this gap. Below is the proposed shape of this object:

ActionError{
	message: text
}

Additional notes

  • rg4py - Add env variable so rg4py can work and re-release with the integrations sdk

Improve validation errors

Pydantic might help with this but the current setup could be improved

Additionally, this would reduce the noise of ValidationErrors as well as allow us to treat returned errors differently when reporting to Raygun (Eg. We log ValidationErrors to Raygun but ActionErrors are simply returned as a result of the tool).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions