more verbose reason for conn fail

This commit is contained in:
fyears
2022-03-21 23:04:56 +08:00
parent 63a66d69f9
commit 4f3e8803da
6 changed files with 72 additions and 15 deletions
+12 -5
View File
@@ -271,15 +271,22 @@ export class RemoteClient {
}
};
checkConnectivity = async () => {
checkConnectivity = async (callbackFunc?: any) => {
if (this.serviceType === "s3") {
return await s3.checkConnectivity(this.s3Client, this.s3Config);
return await s3.checkConnectivity(
this.s3Client,
this.s3Config,
callbackFunc
);
} else if (this.serviceType === "webdav") {
return await webdav.checkConnectivity(this.webdavClient);
return await webdav.checkConnectivity(this.webdavClient, callbackFunc);
} else if (this.serviceType === "dropbox") {
return await dropbox.checkConnectivity(this.dropboxClient);
return await dropbox.checkConnectivity(this.dropboxClient, callbackFunc);
} else if (this.serviceType === "onedrive") {
return await onedrive.checkConnectivity(this.onedriveClient);
return await onedrive.checkConnectivity(
this.onedriveClient,
callbackFunc
);
} else {
throw Error(`not supported service type ${this.serviceType}`);
}