Ftp and Sftp exception status explanation

0 votes
asked Jun 6 by mayank1707 (280 points)

I am writing a SFTP / FTP client. For that I need to know the what error statuses are temporary (client side) errors that might not occur or could be resolved by retrying the operation.

I went through the following links and could not get much clarity on this.

https://api.rebex.net/##RebexTotalPack.chm/Html/T_Rebex_Net_SftpExceptionStatus.htm
https://api.rebex.net/##RebexTotalPack.chm/Html/T_Rebex_Net_FtpExceptionStatus.htm

Could you please help me with that?

Applies to: Rebex SFTP, Rebex FTP/SSL

1 Answer

0 votes
answered Jun 6 by Lukas Matyska (54,470 points)

Basically, if you get Sftp/FtpException, the only reasonable thing you can do is to dispose the client object and reinitialize the connection.

The only case you can continue working with the client object is ProtocolError status, which means that the server is not able to perform requested operation, but the connection is still valid and the client recovered from error in safe way.
E.g. access denied, file does not exists on remote, etc.

For more information about exceptions thrown by Rebex components, please see also this thread.

...