sprinklr-inc/twitter4j-ads

twitter4j.TwitterException.statusCode field type doesn't match error code type return by Ads API

Opened this issue · 2 comments

The standard REST API returns the error codes as int values (https://dev.twitter.com/overview/api/response-codes) and thus the original twitter4j.TwitterException.statusCode field is defined as an int.

However, the Ads API returns the error codes as Strings (https://dev.twitter.com/ads/basics/response-codes), so in case an exception is raised whenever you call the TwitterException.getErrorCode() method you will always get the -1 default value, and it is impossible to get just the actual Ads API String error code.

Many thanks in advance,
Luis

Hey @lpereirafernandez thank you for pointing this out, we would really love if you can find some time to contribute to the repo, if you can fix this and submit a PR, I will be getting to the smaller items next week and wrapping them up but in the meanwhile if you can contribute we would be delighted.

Hi @abhishekanand100 I would really love to be helpful with this but unfortunately I'm not professional or skilled enough with Java and systems like Github. For instance I don't know how PRs works or what to do with them, and I've never contributed with any project so far that way. I'm happy to provide feedback based on my tests, but contributing with this repository is something that really goes beyond my possibilities at this moment.