-
Notifications
You must be signed in to change notification settings - Fork 30k
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
crypto: migrate Certificate to internal/errors #15756
Conversation
Move argument type checking to js, use internal/errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: would be better if the doc changes are in a separate commit
Ok. I can separate those out |
@nodejs/tsc ... ping? Please review? |
@jasnell Feel free to land this now, if you don’t like to go by @joyeecheung’s suggestion, it would be nice if you could backport the doc changes manually so they aren’t lost just because they are in a semver-major PR :) |
function verifySpkac(spkac) { | ||
if (!isArrayBufferView(spkac)) { | ||
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'spkac', | ||
['Buffer', 'TypedArray', 'DataView']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only spkac
doesn't have string
in the error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't know. This was the way it was already. We can add string as an option in a separate follow on commit
I'll do a backport PR for the docs later. |
Move argument type checking to js, use internal/errors PR-URL: #15756 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Landed in 3ddc88b |
Move argument type checking to js, use internal/errors PR-URL: nodejs/node#15756 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Move argument type checking to js, use internal/errors
Improve docs and tests
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
crypto