Commit 74d48279 by Sarath Subramanian

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

parent f1f828fd
...@@ -183,6 +183,9 @@ public class LineageResource { ...@@ -183,6 +183,9 @@ public class LineageResource {
} catch (WebApplicationException e) { } catch (WebApplicationException e) {
LOG.error("Unable to get schema for entity guid={}", guid, e); LOG.error("Unable to get schema for entity guid={}", guid, e);
throw 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) { } catch (Throwable e) {
LOG.error("Unable to get schema for entity={}", guid, e); LOG.error("Unable to get schema for entity={}", guid, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment