I'm writing an extension for Chrome. This extension has a service worker (f.k.a. background script) that makes a network request to a third-party service. However, I'd like to see what happens when this network request fails. How can I block network requests from my service worker to a particular domain or URL?
I know how to do so for content scripts or for ordinary in-page JavaScript; I'm asking specifically about service workers.