Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LIFE-002

A background failure is logged to the extension output channel

When a task the extension starts without waiting for it (a background write, a debounced refresh or a post to the page) is rejected, the extension SHALL report the failure to the logger of the host, the Markdown OKF-Schema Studio output channel in VS Code, instead of leaving an unhandled rejection or writing to the console.

Part of StRS-MDOKFSTUDIO-LIFE-007, outside the paths drawn on its map.

Scenarios 3

The situations the tests check; open one to read it.

nominalA rejected background task is logged
Givena host whose logger records its entries and a background task that rejects with an error
Whenthe extension starts the task with fireAndForget under a context such as "Saving the choice"
Thenthe logger receives one error entry "Saving the choice failed." carrying the error, and no unhandled rejection is raised
boundaryA task that succeeds or does not exist logs nothing
Givena background task that resolves, or an optional call that returned no task
Whenthe extension starts it with fireAndForget
Thenthe logger receives no entry
nominalA rejected storage write reaches the logger of the host
Givenworkspace storage whose update rejects
Whenthe reader changes a view preference
Thenthe logger of the host receives the error entry "Failed to persist the Markdown preview view preferences." and nothing is written to the console

Implemented in 2

Tested by 2