The 401/403 branch added in #1172 threw a plain Error, and RunDownloadJob is registered attempts: 10 with exponential backoff from 30s. A permanent "this build has no entitlement key" rejection therefore retried nine more times over roughly 4h15m, during which the job reads `delayed` rather than `failed` - so the user sees a stuck download instead of the clear message #1172 was written to give them. Each retry also re-hits our own rate-limited Worker. Throw a named GatedContentAuthError from the download util and translate it to UnrecoverableError at the queue boundary in RunDownloadJob, alongside the existing cancellation case. Declaring the class in downloads.ts rather than throwing UnrecoverableError directly keeps BullMQ out of a module that docker_service and map_service also use. Harmless today because no catalog entry uses `auth`, but that ends with the first gated card - see #1204. Fixes #1195 |
||
|---|---|---|
| .. | ||
| controllers | ||
| data | ||
| exceptions | ||
| jobs | ||
| middleware | ||
| models | ||
| services | ||
| utils | ||
| validators | ||