Using ManagementClient.users.update to change a user's password using the same password as the user's current password throws an error, but the errorCode property in the emitted error is undefined.
According to the definition of the error it can't be undefined.
Either change the definition of ManagementClientError.errorCode to allow undefined value or return set the errorCode to a valid string value.
Reproduction
1, create a user with a password
2, use the management api user's manager to update the user's password using the current password
Checklist
Description
Using ManagementClient.users.update to change a user's password using the same password as the user's current password throws an error, but the
errorCode
property in the emitted error is undefined. According to the definition of the error it can't be undefined.Either change the definition of ManagementClientError.errorCode to allow undefined value or return set the errorCode to a valid string value.
Reproduction
1, create a user with a password 2, use the management api user's manager to update the user's password using the current password
3, inspect the error instance
Additional context
No response
node-auth0 version
4.0.1
Node.js version
20.8