Skip to content

Replace generic exceptions with ConfigurationException and ExecutionException in MCP tools and platform-component #4506

@ivicac

Description

@ivicac

Summary

Replace generic Java exceptions (RuntimeException, IllegalStateException, IllegalArgumentException) with domain-specific ConfigurationException and ExecutionException across MCP tool classes and platform-component modules. Introduces dedicated ErrorType enums for each tool to enable structured error identification.

Changes

  • MCP Tool Classes: Replace RuntimeException with ExecutionException in:

    • ProjectToolsImpl (list, get, search, create, update, delete, publish projects)
    • ProjectWorkflowToolsImpl (get, list, search, validate, create, delete, update workflows)
    • ScriptTools (update script)
    • ComponentTools (get component, get/generate trigger, list actions/components/triggers)
    • FirecrawlTools
    • TaskDispatcherTools
    • TaskTools
  • McpToolFacade: Replace IllegalStateException with ConfigurationException

  • platform-component: Replace IllegalArgumentException with ConfigurationException in:

    • PropertyFactory
    • ContextImpl
    • InMemoryDataStorage
    • FileEntryDeserializer
    • ComponentDefinitionRegistry
    • JdbcComponentHandlerImpl
    • TriggerDefinitionServiceImpl
    • SqlUtils
  • New ErrorType enums (7 files):

    • ComponentToolErrorType
    • TaskDispatcherToolErrorType
    • TaskToolErrorType
    • FirecrawlToolErrorType
    • ProjectToolErrorType
    • ProjectWorkflowToolErrorType
    • ScriptToolErrorType
    • McpServerErrorType
    • ComponentErrorType

Motivation

Generic exceptions make it difficult to:

  1. Programmatically identify and handle specific error conditions
  2. Provide meaningful error messages to API consumers
  3. Trace errors back to their origin in monitoring/logging systems

Domain-specific exceptions with ErrorType enums provide structured error classification, improving debuggability and enabling more granular error handling.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

backendConcerning any and all backend issuestaskTask to do

Type

Projects

Status

🏗 In progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions