Open Bug 1838263 Opened 2 years ago Updated 2 years ago

Attempting to download attachments in tests results in JSON parsing errors

Categories

(Firefox :: Remote Settings Client, task)

task

Tracking

()

People

(Reporter: gregtatum, Unassigned)

Details

In Bug 1836505 I'm adding a JSON dump for the translations files. These files require downloading an attachment. In automation, we can't access the network, and in remote settings it appears that the responses are mocked out. However, the attachments fetch is mocked out with some kind of empty or nonsensical response. In Attachments.sys.mjs this results in a JSON parse error.

For my own code, I would prefer to disambiguate between when the attachment is not available for download, and when some other kind of error occurs. The JSON parse error is mysterious and requires knowledge of the interior workings of the attachments mechanism.

In fact, for this quasi-offline mode there is frequent log spam in tests for records not being able to be fetched, and here for attachments JSON failing to parse.

My fear is that since I'm silencing these errors, if an actual error sneaks in later on, it will be hard to diagnose, since I'm ignoring this specific error.

You need to log in before you can comment on or make changes to this bug.