sourcegraph / sourcegraph-extension-api

Sourcegraph extension API: use and build extensions that enhance reading and reviewing code in your existing tools. "The extension API you wish your code host had."
44 stars 2 forks source link

chore: suppress connection error when disabling an extension #91

Closed chrismwendt closed 6 years ago

chrismwendt commented 6 years ago

Previously, an unhandled promise rejection could occur when disabling a Sourcegraph extension. Here's a rough sequence of events that could trigger it:

All I did was suppress the error, because this seems like a case that "shouldn't happen". It's kind of like we're sending SIGTERM to the extension but not waiting 500ms for the extension to exit.

A more involved solution could be: don't send a configuration update to an extension if the only change was the enablement state.

Another solution could be: separate the concepts of enablement state and configuration.

See https://github.com/sourcegraph/sourcegraph/issues/373

sourcegraph-bot commented 6 years ago

:tada: This PR is included in version 18.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: