summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dropbox/src/dropbox.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/Dropbox/src/dropbox.cpp b/plugins/Dropbox/src/dropbox.cpp
index 74dd9acee9..9bb8612e97 100644
--- a/plugins/Dropbox/src/dropbox.cpp
+++ b/plugins/Dropbox/src/dropbox.cpp
@@ -67,14 +67,23 @@ bool CDropbox::HasAccessToken()
void CDropbox::RequestAccountInfo(void *p)
{
- CDropbox *self = (CDropbox*)p;
+ CDropbox *instance = (CDropbox*)p;
- MCONTACT hContact = self->GetDefaultContact();
+ MCONTACT hContact = instance->GetDefaultContact();
ptrA token(db_get_sa(NULL, MODULE, "TokenSecret"));
GetCurrentAccountRequest request(token);
- NLHR_PTR response(request.Send(self->hNetlibConnection));
- HandleJsonResponseError(response);
+ NLHR_PTR response(request.Send(instance->hNetlibConnection));
+
+ try
+ {
+ HandleHttpResponse(response);
+ }
+ catch (DropboxException &ex)
+ {
+ Netlib_Logf(instance->hNetlibConnection, "%s: %s", MODULE, ex.what());
+ return;
+ }
JSONNode root = JSONNode::parse(response->pData);
if (root.empty())