{"action":"opened","issue":{"url":"https://api.github.com/repos/gettyimages/gettyimages-api_java/issues/4","repository_url":"https://api.github.com/repos/gettyimages/gettyimages-api_java","labels_url":"https://api.github.com/repos/gettyimages/gettyimages-api_java/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/gettyimages/gettyimages-api_java/issues/4/comments","events_url":"https://api.github.com/repos/gettyimages/gettyimages-api_java/issues/4/events","html_url":"https://github.com/gettyimages/gettyimages-api_java/issues/4","id":362801357,"node_id":"MDU6SXNzdWUzNjI4MDEzNTc=","number":4,"title":"Token handling issue","user":{"login":"ChrisSimmons","id":301247,"node_id":"MDQ6VXNlcjMwMTI0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/301247?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisSimmons","html_url":"https://github.com/ChrisSimmons","followers_url":"https://api.github.com/users/ChrisSimmons/followers","following_url":"https://api.github.com/users/ChrisSimmons/following{/other_user}","gists_url":"https://api.github.com/users/ChrisSimmons/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisSimmons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisSimmons/subscriptions","organizations_url":"https://api.github.com/users/ChrisSimmons/orgs","repos_url":"https://api.github.com/users/ChrisSimmons/repos","events_url":"https://api.github.com/users/ChrisSimmons/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisSimmons/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-21T23:18:58Z","updated_at":"2018-09-21T23:18:58Z","closed_at":null,"author_association":"MEMBER","body":"We received a report of a possible token handling issue.  In the following code, `response` is occasionally returned `null`.\r\n\r\n``` java\r\nfinal Images images = gettyApiClient.images()\r\n    .withId(gettyId)\r\n    .withResponseFields(METADATA_FIELDS);\r\n\r\nfinal String response;\r\ntry {\r\n    response = images.executeAsync();\r\n} catch (final SdkException exception) {\r\n    final String exceptionAsString = ExceptionUtils.getStackTrace(exception);\r\n    throw new RuntimeException(String.format(gettyApiErrorMessage, exceptionAsString));\r\n}\r\n```\r\n\r\nAfter analysis of the logs, it seems apparent that some calls were generating an `HTTP 401` from the API, indicating something wrong with the security token.  As token-handling should be done within the SDK, this may indicate something wrong with the handling logic."}}
{"actor":{"display_login":"ChrisSimmons"}}