EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Custom Error Message

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 10/16/2014 00:28:48
by wilsontay (Basic support level)
Joined: 08/06/2014
Posts: 11


Is it possible to define a custom error message to be displayed to the FTP user when something happens? From the documentation it seems that custom error message is not possible. Looking at the code the 'comment' parameter in the event handler suggests otherwise - as it seems to be the parameter we set to define custom error message.

Posted: 10/16/2014 01:06:37
by Eugene Mayevski (EldoS Corp.)

Are you asking about FTP server or FTP client components? FTP server lets you customize the messages returned with the response code. On the client side you have the response code and can display any message you like for that code.

Sincerely yours
Eugene Mayevski
Posted: 10/16/2014 01:24:45
by wilsontay (Basic support level)
Joined: 08/06/2014
Posts: 11

I'm asking for SFTP server. I was trying to customize the error message by doing so:

comment = "my custom message";
errorCode = SBSftpCommon.Unit.SSH_ERROR_BASE; //or
errorCode = SBSftpCommon.Unit.SSH_ERROR_NO_SUCH_FILE;

I've tried both and a couple more error codes but I was not able to show my custom error message to the user. I get always an error message specific to the error code (eg: no such file or directory).

The closest error code which I think could be to enable custom error message is 'SBSftpCommon.Unit.ERROR_SFTP_CUSTOM_ERROR_FLAG;' but I got 'unknown error code' displayed on the client side instead.

PS: I'm using FileZilla as my FTP client and I'm trying to send my custom error message to the users from the server instead of doing the error code to message mapping on the client side - mainly due to the fact that I have no control over what FTP client my users will be using.
Posted: 10/16/2014 01:34:57
by Vsevolod Ievgiienko (EldoS Corp.)

The comment is sent in a body of server response with the error code. It seems that your client simply ignores the comment and displays its own message according to the received code.



Topic viewed 361 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!