diff --git a/src/cocoatweet/api/interface/httpGet.cc b/src/cocoatweet/api/interface/httpGet.cc index d35f1ff..d0e3ed5 100644 --- a/src/cocoatweet/api/interface/httpGet.cc +++ b/src/cocoatweet/api/interface/httpGet.cc @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include "nlohmann/json.hpp" #include #include @@ -136,6 +138,12 @@ void HttpGet::process(std::weak_ptr() == 220) { throw CocoaTweet::Exception::CredentialNotAllowedException( message.get().c_str()); + } else if (error.get() == 99) { + throw CocoaTweet::Exception::CredentialNotVerifiedException( + message.get().c_str()); + } else if (error.get() == 348) { + throw CocoaTweet::Exception::InvalidateTokenException( + message.get().c_str()); } else { } } diff --git a/src/cocoatweet/api/interface/httpPost.cc b/src/cocoatweet/api/interface/httpPost.cc index b3640f2..51c5a3b 100644 --- a/src/cocoatweet/api/interface/httpPost.cc +++ b/src/cocoatweet/api/interface/httpPost.cc @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include "nlohmann/json.hpp" #include #include @@ -153,6 +155,12 @@ void HttpPost::process(std::weak_ptr() == 220) { throw CocoaTweet::Exception::CredentialNotAllowedException( message.get().c_str()); + } else if (error.get() == 99) { + throw CocoaTweet::Exception::CredentialNotVerifiedException( + message.get().c_str()); + } else if (error.get() == 348) { + throw CocoaTweet::Exception::InvalidateTokenException( + message.get().c_str()); } }