A network failure is printed and recorded with its reason (closes #196)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Node's `fetch` rejects every failure below HTTP as `fetch failed` and puts the reason on `cause`, so quak printed and recorded only that, and `failures.json` called the failure `unknown`. `describeError` in `src/errors.ts` gives the message followed by the messages on the cause chain; `run` prints it, and the backup logs and records it. `classify` calls a failure transient when `hasTransportCode`, now exported by `src/retry.ts`, finds a transport errno on the chain. The bounded walk along the chain moved from `src/retry.ts` to `src/errors.ts`, so both use one walk. Every message the backup logs or records, `imageMetadataError` and `mlDataError` included, now carries its causes too. Model: opus-5-5
This commit is contained in:
@@ -134,6 +134,13 @@ matters.
|
||||
| `2` | Another backup of the same directory is running. This run sent no request and changed nothing. |
|
||||
| `3` | There is no usable session: none is saved, the saved one is corrupt, or the server no longer accepts it. Run `quak login` as the user the cron job runs as. |
|
||||
|
||||
`<message>` is the error's message, followed by the message of each error that
|
||||
caused it. Node's `fetch` reports every failure below HTTP as just
|
||||
`fetch failed` and gives the reason as its cause, so a run that could not reach
|
||||
the server prints, for example,
|
||||
`quak: fetch failed: connect ECONNREFUSED 1.2.3.4:443`. A file whose download
|
||||
failed that way is in `failures.json` with that error, as a transient failure.
|
||||
|
||||
After a `1`, the next run fetches each missing original again, fetches the ML
|
||||
data that is not cached, and rebuilds the album links. An album quak could not
|
||||
decrypt, or a file in `failures.json` because quak could not decrypt it, keeps
|
||||
@@ -347,7 +354,8 @@ quak/
|
||||
exif.ts EXIF read from an image's bytes with exifreader
|
||||
mldata-fetch.ts fetch + decrypt per-file ML data
|
||||
filename.ts safe file names from server metadata
|
||||
errors.ts error types shared across layers
|
||||
errors.ts error types shared across layers, and how an error
|
||||
is described
|
||||
retry.ts retry classifier + exponential backoff with jitter
|
||||
thumbnails.ts detect + regenerate missing thumbnails
|
||||
client.ts high-level Client class assembled from the above
|
||||
|
||||
Reference in New Issue
Block a user