You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by su...@apache.org on 2016/12/07 05:23:42 UTC

incubator-atlas git commit: ATLAS-1353 Invalid error message(500 internal server error) for lineage query on non-existing table. (sumasai)

Repository: incubator-atlas
Updated Branches:
  refs/heads/master e8a438ca6 -> a1f9008b8


ATLAS-1353 Invalid error message(500 internal server error) for lineage query on non-existing table. (sumasai)


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/a1f9008b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/a1f9008b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/a1f9008b

Branch: refs/heads/master
Commit: a1f9008b8c1184dc3c0ab2d6a7beaa7c0fd558fc
Parents: e8a438c
Author: Suma Shivaprasad <su...@gmail.com>
Authored: Tue Dec 6 21:23:02 2016 -0800
Committer: Suma Shivaprasad <su...@gmail.com>
Committed: Tue Dec 6 21:23:02 2016 -0800

----------------------------------------------------------------------
 release-log.txt                                           |  1 +
 .../org/apache/atlas/web/resources/LineageResource.java   | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a1f9008b/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 5f49d90..3511c1d 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1353 Invalid error message(500 internal server error) for lineage query on non-existing table. (sumasai)
 ATLAS-1347 Creating a class with unknown supertype results in "409 Conflict", where as expected is "400 Bad Message" (apoorvnairk via sumasai)
 ATLAS-737 Add DSL support for Sum, Max, Min and count operations with and without group by (guptaneeru via dkantor)
 ATLAS-1305 Fix potential NPEs in instance conversion code (sumasai)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a1f9008b/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java
index 95fce52..739c6c1 100644
--- a/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java
@@ -91,7 +91,10 @@ public class LineageResource {
             response.put(AtlasClient.RESULTS, new JSONObject(result));
 
             return Response.ok(response).build();
-        } catch (AtlasBaseException | JSONException e) {
+        } catch (AtlasBaseException e) {
+            LOG.error("Unable to get lineage inputs graph for entity guid={}", guid, e);
+            throw new WebApplicationException(Servlets.getErrorResponse(e, e.getAtlasErrorCode().getHttpCode()));
+        } catch (JSONException e) {
             LOG.error("Unable to get lineage inputs graph for entity guid={}", guid, e);
             throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
         }
@@ -119,7 +122,10 @@ public class LineageResource {
             response.put(AtlasClient.RESULTS, new JSONObject(result));
 
             return Response.ok(response).build();
-        } catch (AtlasBaseException | JSONException e) {
+        } catch (AtlasBaseException e) {
+            LOG.error("Unable to get lineage outputs graph for entity guid={}", guid, e);
+            throw new WebApplicationException(Servlets.getErrorResponse(e, e.getAtlasErrorCode().getHttpCode()));
+        } catch (JSONException e) {
             LOG.error("Unable to get lineage outputs graph for entity guid={}", guid, e);
             throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
         }