Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
tls: migrate tls.js to use internal/errors.js #13994
Migrate tls.js to use internal/errors.js as per
The internal code used to set the 'code' as the client.authorizationError, or if no code existed the 'message' as the client.authorizationError. Since with the new approach there is always a 'code' we end up setting the less descriptive code. I guess that is consistent though with what was being done for existing errors with a code anyway.
Affected core subsystem(s)
@refack I'm not following, I looked at the test and I don't see the relation to this PR. I see it already validates the following:
I meant you did not add an assertion of the generated error message for the new error code you introduced
@refack I don't think we have been requiring validating the message. I had mentioned it as a discussion point when reviewing other PRs. I do agree validation at least once makes sense, but was not sure if we should require that in every test for the code.
I'd suggest this as our approach going forward
I've gone ahead and pushed a commit to do that for this PR.
If we agree on the above we should put that guidance into the issue tracking and our internal docs. Once we have agreement I'll do that. The alternative to 3) is that we also require that the message be validated every time the code is used. This would be most thorough.