mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-08 00:36:41 +02:00
Catch a curl timeout exception (#499)
* Catch a curl timeout exception * If we hit a curl exception, log that we hit this, as the handling of the exception in 'some' instances may actually not log an error as to 'why'
This commit is contained in:
parent
f779881ff9
commit
20eda60fdf
|
@ -132,7 +132,12 @@ final class OneDriveApi
|
|||
try {
|
||||
refreshToken = readText(cfg.refreshTokenFilePath);
|
||||
} catch (FileException e) {
|
||||
return authorize();
|
||||
try {
|
||||
return authorize();
|
||||
} catch (CurlException e) {
|
||||
log.error("Cannot authorize with Microsoft OneDrive Service");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
@ -588,8 +593,7 @@ final class OneDriveApi
|
|||
http.perform();
|
||||
} catch (CurlException e) {
|
||||
// Potentially Timeout was reached on handle error
|
||||
// we issue warning/error in the catch routines so no need to warn here
|
||||
// log.error("\nAccess to the Microsoft OneDrive service timed out - Internet connectivity issue?\n");
|
||||
log.error("\nThere was a problem in accessing the Microsoft OneDrive service - Internet connectivity issue?\n");
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue