added try - catch in api and handleError methods

This commit is contained in:
Adina Parpalita
2019-10-22 13:14:57 +03:00
parent 227e05e3f9
commit e8ed183a44
13 changed files with 201 additions and 189 deletions

View File

@@ -47,7 +47,7 @@ export class UploadApi extends RepoApi {
await this.apiAuth();
return await this.upload.uploadFile(file, '', parentFolderId, null, opts);
} catch (error) {
console.log('--- upload api uploadFile catch error: ', error);
this.handleError(`${this.constructor.name} ${this.uploadFile.name}`, error);
}
}
@@ -62,7 +62,7 @@ export class UploadApi extends RepoApi {
await this.apiAuth();
return await this.upload.uploadFile(file, '', parentFolderId, null, opts);
} catch (error) {
console.log('--- upload api uploadFileWithRename catch error: ', error);
this.handleError(`${this.constructor.name} ${this.uploadFileWithRename.name}`, error);
}
}