-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
ballerina-platform/module-ballerina-ftp
#1530Labels
Description
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
Reactions are currently unavailable