You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Fixed OneDrive connection issue
This commit is contained in:
@@ -167,9 +167,16 @@ class OneDriveApi {
|
||||
response = await shim.fetchBlob(url, options);
|
||||
}
|
||||
} catch (error) {
|
||||
// TEMPORARY: To try to find where uncaught error comes from
|
||||
let error = new Error('OneDrive API caught: ' + JSON.stringify(error));
|
||||
throw error;
|
||||
if (error.message == 'Network request failed') {
|
||||
// Unfortunately the error 'Network request failed' doesn't have a type
|
||||
// or error code, so hopefully that message won't change and is not localized
|
||||
this.logger().info('Got error below - retrying...');
|
||||
this.logger().info(error);
|
||||
await time.sleep((i + 1) * 3);
|
||||
continue;
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
if (!response.ok) {
|
||||
@@ -197,7 +204,7 @@ class OneDriveApi {
|
||||
// code: 'EAGAIN' }
|
||||
this.logger().info('Got error below - retrying...');
|
||||
this.logger().info(error);
|
||||
await time.msleep(1000 * i);
|
||||
await time.sleep((i + 1) * 3);
|
||||
continue;
|
||||
} else if (error.code == 'itemNotFound' && method == 'DELETE') {
|
||||
// Deleting a non-existing item is ok - noop
|
||||
|
||||
Reference in New Issue
Block a user