Hopefully fail on no permission

or similar errors
This commit is contained in:
David Baker
2025-12-03 20:41:52 +00:00
parent 7320e3702c
commit e1fb8da2e4

View File

@@ -102,9 +102,15 @@ jobs:
});
if (res.ok) {
console.log(roomId, "topic updated:", topic);
const resJson = res.json();
if (resJson.errcode) {
} else {
core.setFailed(`Error updating ${roomId}: ${resJson.error}`);
console.log(roomId, "topic updated:", topic);
}
} else {
console.log(roomId, await res.text());
const errText = await res.text();
core.setFailed(`Error updating ${roomId}: ${errText}`);
}
}