Skip to content

Add distinct error types to the FTP module #8597

@niveathika

Description

@niveathika

Area

Area/FileIntegration

Current Limitation

Add distinct error types to the FTP module to enable more granular error handling, similar to other modules. This allows users to handle specific error scenarios differently, rather than catching a generic error.

Suggested Improvement

The following error type hierarchy is introduced:

# Base error type
public type Error distinct error;

# Connection failures (network errors, host unreachable, connection refused)
public type ConnectionError distinct Error;

# File/directory not found on remote server
public type FileNotFoundError distinct Error;

# File/directory already exists (e.g., mkdir on existing directory)
public type FileAlreadyExistsError distinct Error;

# Invalid configuration (invalid regex patterns, port numbers, timeout values)
public type InvalidConfigurationError distinct Error;

Version

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions