Repository: atlas
Updated Branches:
  refs/heads/master f1f828fdc -> bd87c3f62


ATLAS-2373: v1 schema API returns 500 Internal server error for invalid guid 
instead of 404


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

Branch: refs/heads/master
Commit: 74d4827943a3b4e4003f14653c78e487387fa595
Parents: f1f828f
Author: Sarath Subramanian <[email protected]>
Authored: Wed Jan 17 21:56:53 2018 -0800
Committer: Sarath Subramanian <[email protected]>
Committed: Wed Jan 17 21:56:53 2018 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/atlas/web/resources/LineageResource.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/74d48279/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 891e4d7..94b5259 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
@@ -183,6 +183,9 @@ public class LineageResource {
         } catch (WebApplicationException e) {
             LOG.error("Unable to get schema for entity guid={}", guid, e);
             throw e;
+        } catch (AtlasBaseException e) {
+            LOG.error("Unable to get schema for entity={}", guid, e);
+            throw new WebApplicationException(Servlets.getErrorResponse(e, 
e.getAtlasErrorCode().getHttpCode()));
         } catch (Throwable e) {
             LOG.error("Unable to get schema for entity={}", guid, e);
             throw new WebApplicationException(Servlets.getErrorResponse(e, 
Response.Status.INTERNAL_SERVER_ERROR));

Reply via email to