Bump version to 1.4.1 and tighten client handling

This commit is contained in:
2026-07-21 01:20:12 +01:00
parent 2ea8d389fa
commit 8393923c5a
15 changed files with 440 additions and 85 deletions
@@ -399,7 +399,14 @@
}).then(function (response) {
if (!response.ok) {
return response.text().then(function (text) {
throw new Error(text || 'Unable to rename client.');
var message = text || 'Unable to rename client.';
try {
var payload = JSON.parse(text);
message = payload && (payload.error || payload.message) ? String(payload.error || payload.message) : message;
} catch (_error) {
// fall back to the raw text body
}
throw new Error(message);
});
}
return response.json().catch(function () {