Browser.downloads.resume is not the same as "Retry"..?

Hello,

when a download fails due to a NETWORK_FAILED error, you can often continue downloading where you left by pressing the “Retry” button (icon with a circular arrow in the download manager) and it works.

I assumed you could do the same programmatically using:
browser.downloads.resume(downloadItem.id);

However this does not work at all. It throws an Error that the download is not resume-able. In the UI I can always “Retry” the download and it continues where it failed (and not from the beginning).

Is there no programmatic way in Firefox to reproduce the functionality of the “Retry” button?

For every other browser (all Chrome variants, Opera, etc.) the programmatic browser.downloads.resume(…) does the same as “Retry”. It will resume the failed download (and not only paused downloads) if technically possible.

Is this a bug?

Potentially. The only possibly related thing a quick bugzilla search brings up is https://bugzilla.mozilla.org/show_bug.cgi?id=1467059

Who is violating the API? Chrome by making “resume” also capable of resuming failed downloads if the server allows resuming from an offset (which many do, and retry is testament to this). Or is Firefox violating the API by excluding it?

I’d say if there’s a discrepancy, a bug is always warranted, unless the discrepancy is explicitly documented.