Updates to updatePassword mutation
Live
June 2, 2025, 10:10 a.m.
What is changing?
From now on, you'll be able to check and handle the errors returned by the updatePassword
mutation by error code instead of error messages.
The new error code KT-CT-5460
is now returned when the provided old password is incorrect. Additionally, and to maintain consistency with other password-related mutations, the KT-CT-5450
error is returned when the provided new password is invalid.
What do I need to do?
This is not a breaking change, and if you're currently checking errors.extensions.validationErrors
, no action is required. However, it's strongly recommended to update existing checks to verify the error codes instead, as those are not dependent on the specific wording of the error messages, which may change.
Before
{
"errors": [
{
"message": "Invalid inputs",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"updatePassword"
],
"extensions": {
"errorClass": "VALIDATION",
"validationErrors": [
{
"message": "Your old password was entered incorrectly. Please enter it again.",
"inputPath": [
"input",
"oldPassword"
]
}
]
}
}
]
}
After
{
"errors": [
{
"message": "Old password is invalid.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"updatePassword"
],
"extensions": {
"errorCode": "KT-CT-5460",
"errorDescription": "Given old password is invalid.",
"errorType": "VALIDATION",
"validationErrors": [
{
"code": "password_incorrect",
"message": "Your old password was entered incorrectly. Please enter it again.",
"inputPath": [
"input",
"oldPassword"
]
}
]
}
}
]
}