fix: error handle

This commit is contained in:
karishmas6
2024-10-26 19:11:31 +05:30
parent 10b522ed06
commit 701f0f3e57

View File

@@ -6,10 +6,10 @@ export const sendProxyConfig = async (proxyConfig: { server_url: string, usernam
if (response.status === 200) {
return response.data;
} else {
throw new Error(`Failed to submit proxy configuration. Try again.`);
throw new Error(`Failed to submit proxy configuration. Status code: ${response.status}`);
}
} catch (error: any) {
console.log(error);
console.error('Error sending proxy configuration:', error.message || error);
return false;
}
}