insights: stop insight polling if api returns an error
Created by: chwarwick
Stop insight polling if an error occurs
resolves https://github.com/sourcegraph/sourcegraph/issues/37862
Test plan
Force an error and ensure GetInsightView
is only called once
App preview:
Check out the client app preview documentation to learn more.