diff --git a/.github/workflows/update-topics.yaml b/.github/workflows/update-topics.yaml index 0df11e68a6..bc2d0f722a 100644 --- a/.github/workflows/update-topics.yaml +++ b/.github/workflows/update-topics.yaml @@ -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}`); } }