diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-22 06:24:56 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-22 06:24:56 -0500 |
| commit | c0a96481c78b790666fe2d6b1a7fa9b652f02343 (patch) | |
| tree | 8eb93908c68bf0f38658d06f6a29ee420df084f9 /tests | |
| parent | b5fe103e6c447d1293233e15250d585d524ecc68 (diff) | |
| download | chime-c0a96481c78b790666fe2d6b1a7fa9b652f02343.tar.gz chime-c0a96481c78b790666fe2d6b1a7fa9b652f02343.zip | |
refactor: extract async result helpers from chime--fetch-and-process
chime--fetch-and-process inlined two near-identical 7-line failure-handling blocks inside the async callback. They differed only in the log prefix ("Async error" for errors surfaced by the async process, "Error processing events" for errors thrown by the callback). Lift the shared body into chime--record-async-failure (err prefix) so the sequence lives in one place, and lift the success path into chime--handle-async-success (callback events) so the callback lambda becomes pure dispatch.
The outer function drops from 44 lines to 22.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
