refactor: improvements

This commit is contained in:
Pranav C
2024-10-25 12:57:52 +00:00
parent 189f9a696f
commit f5da6e22e5
2 changed files with 31 additions and 31 deletions

View File

@@ -367,10 +367,10 @@ const testConnection = async (retry = 0, initialConfig = null) => {
}
}
async function handleConnectionError(e: any, retry: number, initialConfig: any): Promise<void> {
const MAX_RETRIES = 3
const MAX_CONNECTION_RETRIES = 3
if (retry >= MAX_RETRIES) {
async function handleConnectionError(e: any, retry: number, initialConfig: any): Promise<void> {
if (retry >= MAX_CONNECTION_RETRIES) {
testSuccess.value = false
testConnectionError.value = await extractSdkResponseErrorMsg(e)
// reset the connection config to initial state