immich/web/src/lib/utils
Min Idzelis de9ec95db1
fix(web): handle unhandled promise rejection in CancellableTask (#27553)
When a concurrent caller awaits `this.complete` inside `execute()` and
`cancel()` is called, the promise rejects with `undefined` outside of any
try/catch, causing "Uncaught (in promise) undefined" console spam during
rapid timeline scrolling.

- Wrap the `await this.complete` path in try/catch, returning 'CANCELED'
- Guard the `finally` block to only null `cancelToken` if it still belongs
  to this call, preventing a race condition with `cancel()` to `init()`

Change-Id: I65764dd664eb408433fc6e5fc2be4df56a6a6964
2026-04-07 09:22:29 -05:00
..
cast feat(web): loop chromecast video (#24410) 2026-02-18 20:29:13 -05:00
actions.ts refactor: actionable toasts (#27203) 2026-03-26 18:18:06 +01:00
adaptive-image-loader.spec.ts feat: adaptive progressive image loading for photo viewer (#26636) 2026-03-11 09:48:46 -05:00
adaptive-image-loader.svelte.ts feat: adaptive progressive image loading for photo viewer (#26636) 2026-03-11 09:48:46 -05:00
album-utils.ts fix(web): refresh recent albums sidebar after album changes (#26757) 2026-03-09 17:11:32 +01:00
asset-utils.spec.ts feat: change default media location to /data (#20367) 2025-07-29 16:58:50 -04:00
asset-utils.ts refactor(web): rename MonthGroup to TimelineMonth (#27447) 2026-04-03 13:27:12 -04:00
auth.ts refactor: purchase store (#25734) 2026-02-12 13:32:17 -05:00
base-event-manager.svelte.ts fix(web): prevent event manager from throwing error (#26156) 2026-02-12 11:09:15 -05:00
byte-units.spec.ts refactor(web): byte unit utils (#10332) 2024-06-14 17:27:46 +00:00
byte-units.ts fix(web): Make date-time formatting follow locale (#17899) 2025-04-28 08:53:26 -05:00
cancellable-task.spec.ts fix(web): handle unhandled promise rejection in CancellableTask (#27553) 2026-04-07 09:22:29 -05:00
cancellable-task.ts fix(web): handle unhandled promise rejection in CancellableTask (#27553) 2026-04-07 09:22:29 -05:00
container-utils.spec.ts feat(web): OCR overlay interactivity during zoom (#27039) 2026-03-30 19:19:53 -05:00
container-utils.ts feat(web): OCR overlay interactivity during zoom (#27039) 2026-03-30 19:19:53 -05:00
context-menu.ts feat: persistent memories (#15953) 2025-02-21 12:31:37 -06:00
context.ts refactor: asset select manager (#27330) 2026-03-30 15:45:57 +01:00
date-time.spec.ts fix: album card ranges (#25639) 2026-01-28 14:38:09 -05:00
date-time.ts fix: album card ranges (#25639) 2026-01-28 14:38:09 -05:00
dipatch.ts feat(web,server): search people (#5703) 2024-01-27 19:54:31 -05:00
editor.spec.ts fix(web): edit order handling (#25496) 2026-01-27 10:55:10 -06:00
editor.ts fix(web): edit order handling (#25496) 2026-01-27 10:55:10 -06:00
eventemitter.ts refactor: event manager (#25481) 2026-01-23 18:02:23 -05:00
executor-queue.spec.ts fix(web): fix lost scrollpos on deep link to timeline asset, scrub stop (#16305) 2025-03-04 20:34:53 -06:00
executor-queue.ts chore(web): cleanup promise handling (#7382) 2024-02-27 10:37:37 -06:00
exif-utils.spec.ts feat(web): Improve duplicate suggestion (#14947) 2025-01-07 18:30:11 +00:00
exif-utils.ts feat(web): Improve duplicate suggestion (#14947) 2025-01-07 18:30:11 +00:00
file-uploader.spec.ts fix(web): Handle upload failures from public users (#24826) 2026-01-13 15:15:54 +00:00
file-uploader.ts fix: shared link add to album (#27063) 2026-03-20 13:14:07 -05:00
focus-util.ts feat: keyboard navigation to timeline (#17798) 2025-05-28 08:55:14 -05:00
generate-id.ts chore(web): simpler unique ID generation (#9945) 2024-06-02 12:41:44 -04:00
handle-error.ts fix: ignore errors deleting untitled album (#27020) 2026-03-19 12:55:43 -04:00
i18n.ts feat(web): use browser language by default (#10849) 2024-07-04 22:56:54 -05:00
invocationTracker.ts feat: handle-error minor improvments (#25288) 2026-01-21 16:46:08 +00:00
layout-utils.spec.ts feat: adaptive progressive image loading for photo viewer (#26636) 2026-03-11 09:48:46 -05:00
layout-utils.ts feat: image editing (#24155) 2026-01-09 17:59:52 -05:00
license-utils.ts refactor: server config and feature flags managers (#23894) 2025-11-14 14:10:44 -05:00
maintenance.ts feat: restore database backups (#23978) 2026-01-20 09:22:28 -06:00
navigation.ts refactor(web): routes (#25313) 2026-01-16 16:11:09 -05:00
ocr-utils.spec.ts feat(web): OCR overlay interactivity during zoom (#27039) 2026-03-30 19:19:53 -05:00
ocr-utils.ts feat(web): OCR overlay interactivity during zoom (#27039) 2026-03-30 19:19:53 -05:00
people-utils.spec.ts feat(web): OCR overlay interactivity during zoom (#27039) 2026-03-30 19:19:53 -05:00
people-utils.ts feat(web): OCR overlay interactivity during zoom (#27039) 2026-03-30 19:19:53 -05:00
persisted.ts feat(server): resolve duplicates (#25316) 2026-03-26 18:33:55 +00:00
person.ts chore: object shorthand linting rule (#12152) 2024-08-30 14:38:53 -04:00
places-utils.ts feat(web): revamp places (#12219) 2025-02-06 20:54:01 +00:00
purchase-utils.ts chore(web): change license wording and other things (#11309) 2024-07-26 10:34:35 -05:00
server.ts feat: maintenance mode (#23431) 2025-11-17 17:15:44 +00:00
shared-links.ts feat: shared link login (#25678) 2026-02-12 12:08:38 -05:00
slideshow-history.ts feat(web): lighter timeline buckets (#17719) 2025-05-18 02:57:08 +00:00
string-utils.ts feat(web): add geolocation utility (#20758) 2025-08-28 16:54:11 +00:00
sw-messaging.ts feat: remove Cache API, rework preload(), cancel() and fetch() (#25289) 2026-02-12 11:25:20 -05:00
sw-messenger.ts feat: remove Cache API, rework preload(), cancel() and fetch() (#25289) 2026-02-12 11:25:20 -05:00
thumbnail-util.spec.ts fix: regression: sort day by fileCreatedAt again (#18732) 2025-06-05 20:56:32 -05:00
thumbnail-util.ts fix: regression: sort day by fileCreatedAt again (#18732) 2025-06-05 20:56:32 -05:00
timeline-util.spec.ts fix(web): handle buckets before year 1000 (#21832) 2025-09-11 14:36:16 -05:00
timeline-util.ts refactor(web): rename MonthGroup to TimelineMonth (#27447) 2026-04-03 13:27:12 -04:00
timesince.ts feat(web,server): activity (#4682) 2023-10-31 22:13:34 -05:00
tree-utils.ts fix(web): folder view sort oder (#24337) 2025-12-02 11:48:12 -06:00
tunables.ts feat(web): wasm justified layout, sync edition (#23194) 2025-10-25 00:06:05 -05:00
workflow.ts feat: workflow ui (#24190) 2025-12-20 21:07:07 -06:00