Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Net::SFTP::StatusException Exception Information #156

Open
sshaw opened this issue Sep 26, 2024 · 1 comment
Open

Improve Net::SFTP::StatusException Exception Information #156

sshaw opened this issue Sep 26, 2024 · 1 comment

Comments

@sshaw
Copy link

sshaw commented Sep 26, 2024

Currently when a Net::SFTP::StatusException is raised we often get a #message like this:

open /some/path (4, "failure")

Not too informative.

When SFTP is run with logging at :verbose => :debug we see this helpful bit of infrormation:

 net.sftp.session[39ab0c]: SFTP User Exit Error: Bad Filename. SOME HELPFUL INFO"

How to get this information into the Net::SFTP::StatusException? I had a slightly-more-than-cursory look, and it does not look straightforward, but: looks can be deceiving.

@sshaw
Copy link
Author

sshaw commented Sep 26, 2024

open /some/path (4, "failure")
Not too informative.

And status code 4 is "generic failure"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant