{"action":"created","comment":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments/28580257","id":28580257,"diff_hunk":"@@ -103,6 +104,15 @@ private SphereClientImpl(final SphereApiConfig config, final SphereAccessTokenSu\n         exception.setSphereRequest(sphereRequest);\n         exception.setUnderlyingHttpResponse(httpResponse);\n         exception.setProjectKey(config.getProjectKey());\n+\n+        final List<String> errorMessagesDueToMappingError = asList(\"SearchPhaseExecutionException\", \"query_fetch\", \"RemoteTransportException\", \"SearchParseException\", \"search/phase/query+fetch\");\n+        httpResponse.getResponseBody()\n+                .map(bytes -> bytesToString(bytes))\n+                .map(body -> errorMessagesDueToMappingError.stream().anyMatch(errorWord -> body.contains(errorWord)) && body.toLowerCase().contains(\"product\"))\n+                .map(containsTerm -> {\n+                    exception.addNote(String.format(\"Maybe it helps to reindex the products https://admin.sphere.io/%s/developers/danger but this may take a while.\", config.getProjectKey()));\n+                    return null;","path":"java-client-core/src/main/java/io/sphere/sdk/client/SphereClientImpl.java","position":19,"original_position":19,"commit_id":"9c16d5c46eb9e46f35c34d0053c4c7dcec77d2b3","original_commit_id":"9c16d5c46eb9e46f35c34d0053c4c7dcec77d2b3","user":{"login":"lauraluiz","id":1917621,"avatar_url":"https://avatars.githubusercontent.com/u/1917621?v=3","gravatar_id":"","url":"https://api.github.com/users/lauraluiz","html_url":"https://github.com/lauraluiz","followers_url":"https://api.github.com/users/lauraluiz/followers","following_url":"https://api.github.com/users/lauraluiz/following{/other_user}","gists_url":"https://api.github.com/users/lauraluiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraluiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraluiz/subscriptions","organizations_url":"https://api.github.com/users/lauraluiz/orgs","repos_url":"https://api.github.com/users/lauraluiz/repos","events_url":"https://api.github.com/users/lauraluiz/events{/privacy}","received_events_url":"https://api.github.com/users/lauraluiz/received_events","type":"User","site_admin":false},"body":"I just recovered this PR from my mailbox. What I wanted to say here is that I think you can use instead `ifPresent` to avoid returning something.","created_at":"2015-04-17T09:18:10Z","updated_at":"2015-04-17T09:18:10Z","html_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/334#discussion_r28580257","pull_request_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334","_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments/28580257"},"html":{"href":"https://github.com/sphereio/sphere-jvm-sdk/pull/334#discussion_r28580257"},"pull_request":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334"}}},"pull_request":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334","id":32113637,"html_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/334","diff_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/334.diff","patch_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/334.patch","issue_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/334","number":334,"state":"closed","locked":false,"title":"Help to recover from elasticsearch problems.","user":{"login":"schleichardt","id":1320833,"avatar_url":"https://avatars.githubusercontent.com/u/1320833?v=3","gravatar_id":"","url":"https://api.github.com/users/schleichardt","html_url":"https://github.com/schleichardt","followers_url":"https://api.github.com/users/schleichardt/followers","following_url":"https://api.github.com/users/schleichardt/following{/other_user}","gists_url":"https://api.github.com/users/schleichardt/gists{/gist_id}","starred_url":"https://api.github.com/users/schleichardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schleichardt/subscriptions","organizations_url":"https://api.github.com/users/schleichardt/orgs","repos_url":"https://api.github.com/users/schleichardt/repos","events_url":"https://api.github.com/users/schleichardt/events{/privacy}","received_events_url":"https://api.github.com/users/schleichardt/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-27T14:55:00Z","updated_at":"2015-04-17T09:18:10Z","closed_at":"2015-04-14T09:07:53Z","merged_at":null,"merge_commit_sha":"9dacc31a90fe71ca501aa9f958dad9cdb63cf915","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334/commits","review_comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334/comments","review_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/334/comments","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/9c16d5c46eb9e46f35c34d0053c4c7dcec77d2b3","head":{"label":"sphereio:help-recover-from-elasticsearch-issues","ref":"help-recover-from-elasticsearch-issues","sha":"9c16d5c46eb9e46f35c34d0053c4c7dcec77d2b3","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":20855247,"name":"sphere-jvm-sdk","full_name":"sphereio/sphere-jvm-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-jvm-sdk","description":"The next generation SPHERE.IO client running on the Java virtual machine","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/releases{/id}","created_at":"2014-06-15T12:46:24Z","updated_at":"2015-04-17T07:50:47Z","pushed_at":"2015-04-17T07:58:10Z","git_url":"git://github.com/sphereio/sphere-jvm-sdk.git","ssh_url":"git@github.com:sphereio/sphere-jvm-sdk.git","clone_url":"https://github.com/sphereio/sphere-jvm-sdk.git","svn_url":"https://github.com/sphereio/sphere-jvm-sdk","homepage":"","size":24672,"stargazers_count":14,"watchers_count":14,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":119,"forks":6,"open_issues":119,"watchers":14,"default_branch":"master"}},"base":{"label":"sphereio:master","ref":"master","sha":"b8e027c1beeba3ef35ad240c2dd6114375d5e7d2","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":20855247,"name":"sphere-jvm-sdk","full_name":"sphereio/sphere-jvm-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-jvm-sdk","description":"The next generation SPHERE.IO client running on the Java virtual machine","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/releases{/id}","created_at":"2014-06-15T12:46:24Z","updated_at":"2015-04-17T07:50:47Z","pushed_at":"2015-04-17T07:58:10Z","git_url":"git://github.com/sphereio/sphere-jvm-sdk.git","ssh_url":"git@github.com:sphereio/sphere-jvm-sdk.git","clone_url":"https://github.com/sphereio/sphere-jvm-sdk.git","svn_url":"https://github.com/sphereio/sphere-jvm-sdk","homepage":"","size":24672,"stargazers_count":14,"watchers_count":14,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":119,"forks":6,"open_issues":119,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334"},"html":{"href":"https://github.com/sphereio/sphere-jvm-sdk/pull/334"},"issue":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/334"},"comments":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/334/comments"},"review_comments":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334/comments"},"review_comment":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/334/commits"},"statuses":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/9c16d5c46eb9e46f35c34d0053c4c7dcec77d2b3"}}}}