mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-09 17:32:34 +02:00
Handle exception error when query for tenant id
* Handle exception error when query for tenant id
This commit is contained in:
parent
2a93b4ed88
commit
0e886ac27e
12
src/sync.d
12
src/sync.d
|
@ -6139,7 +6139,17 @@ final class SyncEngine
|
|||
|
||||
// Get My Tenent Details
|
||||
string myTenantID;
|
||||
JSONValue tenantDetailsResponse = onedrive.getTenantID();
|
||||
JSONValue tenantDetailsResponse;
|
||||
|
||||
try {
|
||||
tenantDetailsResponse = onedrive.getTenantID();
|
||||
} catch (OneDriveException e) {
|
||||
// display what the error is
|
||||
displayOneDriveErrorMessage(e.msg, getFunctionName!({}));
|
||||
log.error("\nERROR: Authorisation scopes potentially invalid, use --logout to authorize the client again.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (tenantDetailsResponse.type() == JSONType.object) {
|
||||
foreach (searchResult; tenantDetailsResponse["value"].array) {
|
||||
myTenantID = searchResult["id"].str;
|
||||
|
|
Loading…
Reference in a new issue