Repository navigation
Conversation
puellanivis
left a comment
There was a problem hiding this comment.
Error codes starting from 32 can also possibly be returned from the server. But we’re not supporting them because they are not yet defined.
In a similar vein, this package specifically only supports https://filezilla-project.org/specs/draft-ietf-secsh-filexfer-02.txt for which these errors are also not defined, and so no server using this package should be returning them, and since this package’s client has not negotiated an upgrade of version, a properly compliant server should also never return these codes.
If anyone does want to use these extended error codes, then I would recommend they instead switch to the dev-v2 branch, which has taken an intentional approach towards supporting these errors in its encoding/ssh/filexfer package.
The error codes starting from 9 are defined internally and can be returned by the server, but without exported error constants it's impractical to match on and handle these errors. This change adds Err constants and text error strings for these codes.
|
I repeat that adding this feature to the With a |
|
Some of my colleagues use this package, to some extent because I used it 10 years ago, to talk to various network devices (and you know how quirky the protocol support can be for these; there should be a commit in the history with my name on it related to that). It's your decision after all, if this is not accepted I'll just update my private fork. Thanks. |
|
Yeah, I understand how simple the change is, and why it might be useful… it’s just more of a “yeah, but technically all of those are explicitly unsupported by the version we’re supporting.” They might be defined, but also… not really. 😩 It’s a rough choice especially when just about everything stopped supporting any version except the one we’re on. Like, I believe they’re trying to start up a newest version, and the plan is basically to reset back to this version, because no one was really ever supporting anything beyond this version. 🤦♀️ @drakkan What’s your perspective on this? I don’t want to be heavy handed here, especially when I’m conflicted even myself. |
|
I’d like to better understand your use case. As @puellanivis explained, the error codes are defined by the SFTP v3 specification that we implement. OpenSSH, which follows the same specification as this package, defines the same set of error codes. Since we advertise SFTP protocol version 3, a compliant implementation is expected to return only the error codes defined in the negotiated specification. Could you share which SFTP implementation is returning error codes from later specification versions? Is this something we can test ourselves, or is it a proprietary implementation? Thank you |
The error codes starting from 9 are defined internally and can be returned by the server, but without exported error constants it's impractical to match on and handle these errors.
This change adds Err constants and text error strings for these codes.