"Clone in progress" errors are not properly handled
Created by: felixfbecker
The function retryWhenCloneInProgressError()
, for example used by the "open on Sourcegraph" button, does not properly detect the error if it comes from the background page (which is always the case in the browser extension).
This surfaced because I recently changed the button to show errors instead of swallowing them:
It happens because it checks for the error's code
, but that is not cloned through the page boundary, see https://github.com/mozilla/webextension-polyfill/issues/210.
For a workaround, we can check the error message like we do for HTTPStatusError
. This bug applies to all errors.