update getHealth function to work with stop button
This commit is contained in:
parent
870193d595
commit
6201035891
1 changed files with 9 additions and 1 deletions
|
|
@ -325,7 +325,15 @@ export async function getVersion() {
|
||||||
* @returns {Promise<AxiosResponse<any>>} A promise that resolves to an AxiosResponse containing the health status.
|
* @returns {Promise<AxiosResponse<any>>} A promise that resolves to an AxiosResponse containing the health status.
|
||||||
*/
|
*/
|
||||||
export async function getHealth() {
|
export async function getHealth() {
|
||||||
return await api.get("/health"); // Health is the only endpoint that doesn't require /api/v1
|
return await api.get("/health").catch(e=>{
|
||||||
|
if(e.code==="ECONNABORTED"){
|
||||||
|
console.log("request cancelled");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// raise error to be caught by the caller
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}); // Health is the only endpoint that doesn't require /api/v1
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue