crypto: fix error handling in KeyObject.export by tniessen · Pull Request #26455 · nodejs/node (original) (raw)

I can't find current policy. I find https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#breaking-changes-and-deprecations

Changing error messages for errors without error code;

That this is in the list implies that such changes are at least sometimes semver-major, but not that they are always. Maybe? IANAL.

Personally, I think its unlikely to cause trouble to introduce this as a patch.

But, my understanding was that historically Node.js guessing an error message change wouldn't cause trouble didn't work out so well, so .code was introduced, and error message changes were considered semver-major until a .code is introduced, at which point they become informational. My understanding has been wrong before, though.