{"errorMessage":"Could not update user!"} when using admin api

I am trying to use the admin api to update user info but when the api is called it returns this error:

{"errorMessage":"Could not update user!"}

The weird part is that when I check the user info after running the update api the information is updated correctly but the message returned is incorrect. I’m not sure if that is due to something on my end but here is the fetch call I am using to do the update

await fetch(`http://${process.env.KEYCLOAK_ENDPOINT}/auth/admin/realms/${process.env.KEYCLOAK_REALM}/users/${user_id}`,{
  method: 'PUT',
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + token['access_token'],
  },
  body: JSON.stringify(updateUserDto),
  redirect: 'follow' 
})
.then(response => response.text())
.then(result => console.log(result))
return false

}