mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-10 19:49:08 +00:00
The guard read `status[status.length-1].last_status` on the pipeline_run history. For a pipeline that has never run — which is the permanent state of CDC pipelines, since they replicate continuously and never record batch runs — pipeline_run is empty, so the last element is undefined and `.last_status` threw, surfacing as "Error checking pipeline status: Cannot read properties of undefined (reading 'last_status')". This blocked Edit Objects (and delete-table) for every CDC pipeline. Treat an empty/statusless run history as "not running" and allow the edit (undefined never satisfied 'running' anyway). Also stop the catch from double-wrapping the deliberate is-running BadRequestException, so that rejection keeps its clear message; genuine status-check failures still fail closed with the wrapped message (safe default for a destructive-op gate). Adds a guard spec: empty history -> allow, statusless -> allow, not running -> allow, running -> is-running message (not wrapped), platform error -> wrapped message. Co-Authored-By: WOZCODE <contact@withwoz.com> Claude-Session: https://claude.ai/code/session_01145m1zZMfx8RSJBxAhySdg