diff options
Diffstat (limited to 'plugins/CloudFile/src/Services/dropbox_service.cpp')
-rw-r--r-- | plugins/CloudFile/src/Services/dropbox_service.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/CloudFile/src/Services/dropbox_service.cpp b/plugins/CloudFile/src/Services/dropbox_service.cpp index 2d308a28f8..409494e9d3 100644 --- a/plugins/CloudFile/src/Services/dropbox_service.cpp +++ b/plugins/CloudFile/src/Services/dropbox_service.cpp @@ -173,7 +173,15 @@ void CDropboxService::CreateSharedLink(const char *path, char *url) DropboxAPI::CreateSharedLinkRequest shareRequest(token, path); NLHR_PTR response(shareRequest.Send(hConnection)); - HandleHttpError(response); + if (response == NULL) + throw Exception(HttpStatusToError()); + + if (!HTTP_CODE_SUCCESS(response->resultCode) && + response->resultCode != HTTP_CODE_CONFLICT) { + if (response->dataLength) + throw Exception(response->pData); + throw Exception(HttpStatusToError(response->resultCode)); + } JSONNode root = JSONNode::parse(response->pData); if (root.isnull()) |