{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/10352","labels_url":"https://api.github.com/repos/apache/spark/issues/10352/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/10352/comments","events_url":"https://api.github.com/repos/apache/spark/issues/10352/events","html_url":"https://github.com/apache/spark/pull/10352","id":122681084,"number":10352,"title":"[SPARK-12399] Display correct error message when accessing REST API with an unknown app Id","user":{"login":"carsonwang","id":9278199,"avatar_url":"https://avatars.githubusercontent.com/u/9278199?v=3","gravatar_id":"","url":"https://api.github.com/users/carsonwang","html_url":"https://github.com/carsonwang","followers_url":"https://api.github.com/users/carsonwang/followers","following_url":"https://api.github.com/users/carsonwang/following{/other_user}","gists_url":"https://api.github.com/users/carsonwang/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonwang/subscriptions","organizations_url":"https://api.github.com/users/carsonwang/orgs","repos_url":"https://api.github.com/users/carsonwang/repos","events_url":"https://api.github.com/users/carsonwang/events{/privacy}","received_events_url":"https://api.github.com/users/carsonwang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-17T07:47:02Z","updated_at":"2015-12-17T08:02:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/10352","html_url":"https://github.com/apache/spark/pull/10352","diff_url":"https://github.com/apache/spark/pull/10352.diff","patch_url":"https://github.com/apache/spark/pull/10352.patch"},"body":"I got an exception when accessing the below REST API with an unknown application Id.\r\n`/api/v1/applications/xxx/jobs`\r\nInstead of an exception, I expect an error message \"no such app: xxx\" which is a similar error message when I access `/api/v1/applications/xxx`\r\n```\r\norg.spark-project.guava.util.concurrent.UncheckedExecutionException: java.util.NoSuchElementException: no app with key xxx\r\n\tat org.spark-project.guava.cache.LocalCache$Segment.get(LocalCache.java:2263)\r\n\tat org.spark-project.guava.cache.LocalCache.get(LocalCache.java:4000)\r\n\tat org.spark-project.guava.cache.LocalCache.getOrLoad(LocalCache.java:4004)\r\n\tat org.spark-project.guava.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)\r\n\tat org.apache.spark.deploy.history.HistoryServer.getSparkUI(HistoryServer.scala:116)\r\n\tat org.apache.spark.status.api.v1.UIRoot$class.withSparkUI(ApiRootResource.scala:226)\r\n\tat org.apache.spark.deploy.history.HistoryServer.withSparkUI(HistoryServer.scala:46)\r\n\tat org.apache.spark.status.api.v1.ApiRootResource.getJobs(ApiRootResource.scala:66)\r\n```"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/165378338","html_url":"https://github.com/apache/spark/pull/10352#issuecomment-165378338","issue_url":"https://api.github.com/repos/apache/spark/issues/10352","id":165378338,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T08:02:38Z","updated_at":"2015-12-17T08:02:38Z","body":"Merged build finished. Test FAILed."}}