Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Connect-FTP or getWorstMessage returns different msgs

SA-50168

Summary



When the FTP server is not reachable, in Pega 7.1.8, the getWorstMessage() function returned "** FTP Connection failed" and one can implement a Field Value of type ErrorLabel permitting to translate this message.

In Pega 7.2.2, with the same exact code, the getWorstMessage(tools) function returns "**
Error working with local path: '/tmp/CD02001B46.txt', connect timed out", so the field value is not used anymore and the error message is not understandable for the average user.



Error Messages



"** Error working with local path: '/tmp/CD02001B46.txt', connect timed out"


Steps to Reproduce



1. Use the Connect-FTP method in an activity with a non-functioning FTP site.
2. Catch getWorstMessage(tools) value.


Root Cause



The code has evolved to handle connectivity errors more precisely and, hence, the individual messages are now reported instead of standard error as seen in Pega 7.1.8. few examples are below:
  • ** Cannot access remote Directory: /pub/ -- this was for good FTP server, but wrong remote folder permissions on that server
  • ** File does not exist or cannot be read: c:\abdc.txasdsdf - this was for wrong file name
  • ** Error working with local path: 'c:\abdc.txt', <FTP SERVER NAME HERE> - this is when wrong FTP is used
  • ** Error working with local path: 'c:\abdc.txt', connect timed ou - this is when you cannot connect to the correct FTP server


Resolution



Here’s the explanation for the reported behavior:

This is up to Application design on how to handle those individual messages reported as exception for the Connect-FTP Step in the Activity.

The best approach is to implement the error handler for the UI that operators will see to use hardcoded application specific
message using Field Values for each locale.



Published April 13, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us