fix: error handle
This commit is contained in:
@@ -6,10 +6,10 @@ export const sendProxyConfig = async (proxyConfig: { server_url: string, usernam
|
|||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
return response.data;
|
return response.data;
|
||||||
} else {
|
} 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) {
|
} catch (error: any) {
|
||||||
console.log(error);
|
console.error('Error sending proxy configuration:', error.message || error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user