An expired session exits 3 with one line saying to run quak login (closes #164)
check / check (push) Successful in 2m20s

A 401 from the server reaches run in src/cli-run.ts as the ApiError the
refresh threw, so run recognises it there, prints one line saying to run
"quak login" and exits 3. A missing or corrupt session file keeps its message
and also exits 3. quak backup meets the 401 on its first refresh, before it
touches any file. Every other error still exits 1.

Judgement call: quak logout is unchanged; it handles its own errors and
deletes the session file whatever the server answers.
Judgement call: quak backup still prints its two progress lines before the
error line.

Model: opus-5-5
This commit is contained in:
2026-10-06 01:21:30 +00:00
parent 14ac7d05ef
commit 1283048ce2
6 changed files with 141 additions and 37 deletions
+9
View File
@@ -25,6 +25,15 @@ declares one.
# Completed Steps
- 2026-10-05: A command whose saved session the server no longer accepts
(HTTP 401) prints one line,
`quak: the saved session is no longer valid; run "quak login"`, and exits 3
(issue 164). A missing or corrupt session file keeps its message and now also
exits 3, so a cron job can tell that the user must log in again. `run` in
`src/cli-run.ts` recognises the 401, which reaches it unchanged from the
refresh, so `quak backup` stops there before it touches any file. Every other
error still exits 1.
- 2026-10-03: The download-albums example test no longer fails on a disk with
under 50 GiB free (issue 160). It opens its libraries with
`freeBelowBytes: 0`, so the free space of the disk it runs on cannot shrink