feat: notify sentry when connection test on new host fail
This commit is contained in:
parent
2f4444bd5e
commit
41a02d1ead
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,9 @@
|
|||
fetch(hintUrl, { mode: 'cors' }).then(() => {
|
||||
window.location = '#{new_host_url}';
|
||||
}).catch((e) => {
|
||||
// TODO: notify us in order to monitor connectivity issues volume
|
||||
const error = new Error("Connection test on new host failed: " + e);
|
||||
const event = new CustomEvent("sentry:capture-exception", { detail: error });
|
||||
setTimeout(() => dispatchEvent(event), 100); // listener is not immediately enabled
|
||||
})
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue