mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-20 09:31:15 +00:00
fix: don't mark server deleted when cloud API delete fails (#1935)
When spawn delete encounters a cloud API error (network timeout, 500, auth failure), the server is still running. Marking the record as deleted in this case hides it from spawn delete/spawn list, preventing retry and causing untracked billing. Only mark as deleted on: (1) successful deletion, (2) server already gone/404. Error paths keep the record active for retry. Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
556f32ecfc
commit
2321352a6b
1 changed files with 0 additions and 1 deletions
|
|
@ -2282,7 +2282,6 @@ async function execDeleteServer(record: SpawnRecord): Promise<boolean> {
|
|||
}
|
||||
p.log.error(`Delete failed: ${errMsg}`);
|
||||
p.log.info("The server may still be running. Check your cloud provider dashboard.");
|
||||
markRecordDeleted(record);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue