It turns out one can’t update a user’s locale, this turns out strange because the error can’t be reproduced locally. This is reproducible on the QA-RefApp and Demo test server.
To troubleshoot this, I would need to look into the server logs, can someone(I’m not sure of the champion to reach-out to here) share the server logs from the community managed test servers(QA-RefApp/Demo).
Thanks for the pointer Daniel. Though I realised the cause of this error in our environment is:
Any user to be able to edit their preferences, they are required to have the Edit Users privilege(checkout why). However, this seems like flaw in design. The Edit Users privilege is for those users that require the capability of editing users(self and other users) - Those users are supposed to play an administrative role. However, even providers need to edit their user preferences hence I believe a new privilege should exist for this? @mksd suggested having a new privilege close to ‘Edit Self User’.
The bottom line is, non admins(providers) or any basic user requires to edit the user preferences like language.
I completely agree that users need to be able to manage their own preferences without the ability to edit other users. That strikes me as just basic functionality.
I’d be interested to have some more details about how an “Edit Self” permission might work in conjunction with maintaining the ability for appropriate administrators to add and edit other users, but in principle, this is the right way to go.