**List of steps to reproduce** (step by step, including full links if applicable):
* Submit a query on Quarry, especially one that takes a while to complete ([[https://quarry.wmflabs.org/query/58210|example]]).
* Try to stop the execution of the query by clicking on the Stop button.
A dialogue is shown in which a 500 message returned by the server is displayed. See screenshot:
**What should have happened instead?**:
* The query should stop, or a more graceful error message should be shown.
* After some time, the query's max execution time will be over. At this point, Quarry's UI should be able to determine that the query has been stopped, and Stop button should switch back to Submit Query button.
**Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc**:
Unsure; Quarry's UI does not show which version is running. But most likely 98898f0613c962303c08ae07c1a39414d5cce4a3 because (a) it is the HEAD of the master branch right now, and (b) the feature it added is enabled in production.