1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-05 22:57:29 +02:00

All: Identify another Dropbox missing auth error, to allow resetting the token

This commit is contained in:
Laurent Cozic
2018-05-22 15:03:55 +01:00
committed by GitHub
parent 9eb62920f7
commit 6898b9ca4c

View File

@@ -100,6 +100,8 @@ class DropboxApi {
isTokenError(status, responseText) {
if (status === 401) return true;
if (responseText.indexOf('OAuth 2 access token is malformed') >= 0) return true;
// eg. Error: POST files/create_folder_v2: Error (400): Error in call to API function "files/create_folder_v2": Must provide HTTP header "Authorization" or URL parameter "authorization".
if (responseText.indexOf('Must provide HTTP header "Authorization"') >= 0) return true;
return false;
}
@@ -211,4 +213,4 @@ class DropboxApi {
}
module.exports = DropboxApi;
module.exports = DropboxApi;