Before and after submitAndRunTask(taskRequest), the loading state of the button should be set:
...
setLoading(true);
await submitAndRunTask(taskRequest);
setLoading(false);
...
Recent experiences with further downstream services being broken has created a situation where the response returned is 500 after a timeout period. After the response has been returned, the loading state should again be set to false but currently is not.

Before and after
submitAndRunTask(taskRequest), the loading state of the button should be set:... setLoading(true); await submitAndRunTask(taskRequest); setLoading(false); ...Recent experiences with further downstream services being broken has created a situation where the response returned is

500after a timeout period. After the response has been returned, the loading state should again be set to false but currently is not.