Commit 3a70d11d by Sarath Subramanian

ATLAS-1611: Regression: Incorrect error code for the negative tests, returned:…

ATLAS-1611: Regression: Incorrect error code for the negative tests, returned: 500 server error, expected: 400 bad request
parent 4feee3bf
...@@ -1190,8 +1190,14 @@ public class EntityResource { ...@@ -1190,8 +1190,14 @@ public class EntityResource {
return jsonArray; return jsonArray;
} }
private AtlasEntityType getEntityType(String typeName) { private AtlasEntityType getEntityType(String typeName) throws AtlasBaseException {
return typeRegistry.getEntityTypeByName(typeName); AtlasEntityType ret = typeRegistry.getEntityTypeByName(typeName);
if (ret == null) {
throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_NOT_FOUND, typeName);
}
return ret;
} }
public static WebApplicationException toWebApplicationException(AtlasBaseException e) { public static WebApplicationException toWebApplicationException(AtlasBaseException e) {
......
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