Commit 39eb9f1e by Hemanth Yamijala

ATLAS-890 Log received messages in case of error (sumasai via yhemanth)

parent aad34ae0
...@@ -159,6 +159,11 @@ public class HookNotification implements JsonDeserializer<HookNotification.HookN ...@@ -159,6 +159,11 @@ public class HookNotification implements JsonDeserializer<HookNotification.HookN
public List<Referenceable> getEntities() throws JSONException { public List<Referenceable> getEntities() throws JSONException {
return entities; return entities;
} }
@Override
public String toString() {
return entities.toString();
}
} }
/** /**
...@@ -210,6 +215,16 @@ public class HookNotification implements JsonDeserializer<HookNotification.HookN ...@@ -210,6 +215,16 @@ public class HookNotification implements JsonDeserializer<HookNotification.HookN
public String getAttributeValue() { public String getAttributeValue() {
return attributeValue; return attributeValue;
} }
@Override
public String toString() {
return "{"
+ "entityType='" + typeName + '\''
+ ", attribute=" + attribute
+ ", value=" + attributeValue
+ ", entity=" + entity
+ '}';
}
} }
/** /**
...@@ -247,5 +262,14 @@ public class HookNotification implements JsonDeserializer<HookNotification.HookN ...@@ -247,5 +262,14 @@ public class HookNotification implements JsonDeserializer<HookNotification.HookN
public String getAttributeValue() { public String getAttributeValue() {
return attributeValue; return attributeValue;
} }
@Override
public String toString() {
return "{"
+ "entityType='" + typeName + '\''
+ ", attribute=" + attribute
+ ", value=" + attributeValue
+ '}';
}
} }
} }
...@@ -23,6 +23,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset ...@@ -23,6 +23,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags) ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-890 Log received messages in case of error (sumasai via yhemanth)
ATLAS-888 NPE in NotificationHookConsumer (sumasai via shwethags) ATLAS-888 NPE in NotificationHookConsumer (sumasai via shwethags)
ATLAS-884 Process registration should call Entity update instead of create (sumasai) ATLAS-884 Process registration should call Entity update instead of create (sumasai)
ATLAS-515 Ability to initialize Kafka topics with more than 1 replica (yhemanth) ATLAS-515 Ability to initialize Kafka topics with more than 1 replica (yhemanth)
......
...@@ -105,6 +105,8 @@ public class EntityResource { ...@@ -105,6 +105,8 @@ public class EntityResource {
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE)
public Response submit(@Context HttpServletRequest request) { public Response submit(@Context HttpServletRequest request) {
String entityJson = null;
try { try {
String entities = Servlets.getRequestPayload(request); String entities = Servlets.getRequestPayload(request);
...@@ -118,7 +120,8 @@ public class EntityResource { ...@@ -118,7 +120,8 @@ public class EntityResource {
}}.toString(); }}.toString();
} }
LOG.debug("submitting entities {} ", AtlasClient.toString(new JSONArray(entities))); entityJson = AtlasClient.toString(new JSONArray(entities));
LOG.debug("submitting entities {} ", entityJson);
final List<String> guids = metadataService.createEntities(entities); final List<String> guids = metadataService.createEntities(entities);
JSONObject response = getResponse(new AtlasClient.EntityResult(guids, null, null)); JSONObject response = getResponse(new AtlasClient.EntityResult(guids, null, null));
...@@ -128,16 +131,16 @@ public class EntityResource { ...@@ -128,16 +131,16 @@ public class EntityResource {
return Response.created(locationURI).entity(response).build(); return Response.created(locationURI).entity(response).build();
} catch(EntityExistsException e) { } catch(EntityExistsException e) {
LOG.error("Unique constraint violation", e); LOG.error("Unique constraint violation for entity entityDef={}", entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.CONFLICT)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.CONFLICT));
} catch (ValueConversionException ve) { } catch (ValueConversionException ve) {
LOG.error("Unable to persist entity instance due to a deserialization error ", ve); LOG.error("Unable to persist entity instance due to a deserialization error entityDef={}", entityJson, ve);
throw new WebApplicationException(Servlets.getErrorResponse(ve.getCause(), Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(ve.getCause(), Response.Status.BAD_REQUEST));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to persist entity instance", e); LOG.error("Unable to persist entity instance entityDef={}", entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to persist entity instance", e); LOG.error("Unable to persist entity instance entityDef={}", entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
} }
} }
...@@ -180,24 +183,28 @@ public class EntityResource { ...@@ -180,24 +183,28 @@ public class EntityResource {
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE)
public Response updateEntities(@Context HttpServletRequest request) { public Response updateEntities(@Context HttpServletRequest request) {
String entityJson = null;
try { try {
final String entities = Servlets.getRequestPayload(request); final String entities = Servlets.getRequestPayload(request);
LOG.debug("updating entities {} ", AtlasClient.toString(new JSONArray(entities)));
entityJson = AtlasClient.toString(new JSONArray(entities));
LOG.debug("updating entities {} ", entityJson);
AtlasClient.EntityResult entityResult = metadataService.updateEntities(entities); AtlasClient.EntityResult entityResult = metadataService.updateEntities(entities);
JSONObject response = getResponse(entityResult); JSONObject response = getResponse(entityResult);
return Response.ok(response).build(); return Response.ok(response).build();
} catch(EntityExistsException e) { } catch(EntityExistsException e) {
LOG.error("Unique constraint violation", e); LOG.error("Unique constraint violation for entityDef={}", entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.CONFLICT)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.CONFLICT));
} catch (ValueConversionException ve) { } catch (ValueConversionException ve) {
LOG.error("Unable to persist entity instance due to a deserialization error ", ve); LOG.error("Unable to persist entity instance due to a deserialization error entityDef={}", entityJson, ve);
throw new WebApplicationException(Servlets.getErrorResponse(ve.getCause(), Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(ve.getCause(), Response.Status.BAD_REQUEST));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to persist entity instance", e); LOG.error("Unable to persist entity instance entityDef={}", entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to persist entity instance", e); LOG.error("Unable to persist entity instance entityDef={}", entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
} }
} }
...@@ -241,32 +248,35 @@ public class EntityResource { ...@@ -241,32 +248,35 @@ public class EntityResource {
public Response updateByUniqueAttribute(@QueryParam("type") String entityType, public Response updateByUniqueAttribute(@QueryParam("type") String entityType,
@QueryParam("property") String attribute, @QueryParam("property") String attribute,
@QueryParam("value") String value, @Context HttpServletRequest request) { @QueryParam("value") String value, @Context HttpServletRequest request) {
String entityJson = null;
try { try {
String entities = Servlets.getRequestPayload(request); entityJson = Servlets.getRequestPayload(request);
LOG.debug("Partially updating entity by unique attribute {} {} {} {} ", entityType, attribute, value, entities); LOG.debug("Partially updating entity by unique attribute {} {} {} {} ", entityType, attribute, value, entityJson);
Referenceable updatedEntity = Referenceable updatedEntity =
InstanceSerialization.fromJsonReferenceable(entities, true); InstanceSerialization.fromJsonReferenceable(entityJson, true);
AtlasClient.EntityResult entityResult = AtlasClient.EntityResult entityResult =
metadataService.updateEntityByUniqueAttribute(entityType, attribute, value, updatedEntity); metadataService.updateEntityByUniqueAttribute(entityType, attribute, value, updatedEntity);
JSONObject response = getResponse(entityResult); JSONObject response = getResponse(entityResult);
return Response.ok(response).build(); return Response.ok(response).build();
} catch (ValueConversionException ve) { } catch (ValueConversionException ve) {
LOG.error("Unable to persist entity instance due to a deserialization error ", ve); LOG.error("Unable to persist entity instance due to a deserialization error {} ", entityJson, ve);
throw new WebApplicationException(Servlets.getErrorResponse(ve.getCause(), Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(ve.getCause(), Response.Status.BAD_REQUEST));
} catch(EntityExistsException e) { } catch(EntityExistsException e) {
LOG.error("Unique constraint violation", e); LOG.error("Unique constraint violation for entity {} ", entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.CONFLICT)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.CONFLICT));
} catch (EntityNotFoundException e) { } catch (EntityNotFoundException e) {
LOG.error("An entity with type={} and qualifiedName={} does not exist", entityType, value, e); LOG.error("An entity with type={} and qualifiedName={} does not exist {} ", entityType, value, entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to create/update entity {}" + entityType + ":" + attribute + "." + value, e); LOG.error("Unable to partially update entity {} {} " + entityType + ":" + attribute + "." + value, entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to update entity {}" + entityType + ":" + attribute + "." + value, e); LOG.error("Unable to partially update entity {} {} " + entityType + ":" + attribute + "." + value, entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
} }
} }
...@@ -294,9 +304,10 @@ public class EntityResource { ...@@ -294,9 +304,10 @@ public class EntityResource {
} }
private Response updateEntityPartialByGuid(String guid, HttpServletRequest request) { private Response updateEntityPartialByGuid(String guid, HttpServletRequest request) {
String entityJson = null;
try { try {
ParamChecker.notEmpty(guid, "Guid property cannot be null"); ParamChecker.notEmpty(guid, "Guid property cannot be null");
final String entityJson = Servlets.getRequestPayload(request); entityJson = Servlets.getRequestPayload(request);
LOG.debug("partially updating entity for guid {} : {} ", guid, entityJson); LOG.debug("partially updating entity for guid {} : {} ", guid, entityJson);
Referenceable updatedEntity = Referenceable updatedEntity =
...@@ -305,13 +316,13 @@ public class EntityResource { ...@@ -305,13 +316,13 @@ public class EntityResource {
JSONObject response = getResponse(entityResult); JSONObject response = getResponse(entityResult);
return Response.ok(response).build(); return Response.ok(response).build();
} catch (EntityNotFoundException e) { } catch (EntityNotFoundException e) {
LOG.error("An entity with GUID={} does not exist", guid, e); LOG.error("An entity with GUID={} does not exist {} ", guid, entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to update entity {}", guid, e); LOG.error("Unable to update entity by GUID {} {}", guid, entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to update entity {}", guid, e); LOG.error("Unable to update entity by GUID {} {} ", guid, entityJson, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
} }
} }
...@@ -327,22 +338,23 @@ public class EntityResource { ...@@ -327,22 +338,23 @@ public class EntityResource {
* @return response payload as json * @return response payload as json
*/ */
private Response updateEntityAttributeByGuid(String guid, String property, HttpServletRequest request) { private Response updateEntityAttributeByGuid(String guid, String property, HttpServletRequest request) {
String value = null;
try { try {
Preconditions.checkNotNull(property, "Entity property cannot be null"); Preconditions.checkNotNull(property, "Entity property cannot be null");
String value = Servlets.getRequestPayload(request); value = Servlets.getRequestPayload(request);
Preconditions.checkNotNull(value, "Entity value cannot be null"); Preconditions.checkNotNull(value, "Entity value cannot be null");
AtlasClient.EntityResult entityResult = metadataService.updateEntityAttributeByGuid(guid, property, value); AtlasClient.EntityResult entityResult = metadataService.updateEntityAttributeByGuid(guid, property, value);
JSONObject response = getResponse(entityResult); JSONObject response = getResponse(entityResult);
return Response.ok(response).build(); return Response.ok(response).build();
} catch (EntityNotFoundException e) { } catch (EntityNotFoundException e) {
LOG.error("An entity with GUID={} does not exist", guid, e); LOG.error("An entity with GUID={} does not exist {} ", guid, value, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to add property {} to entity id {}", property, guid, e); LOG.error("Unable to add property {} to entity id {} {} ", property, guid, value, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to add property {} to entity id {}", property, guid, e); LOG.error("Unable to add property {} to entity id {} {} ", property, guid, value, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
} }
} }
...@@ -377,16 +389,16 @@ public class EntityResource { ...@@ -377,16 +389,16 @@ public class EntityResource {
return Response.ok(response).build(); return Response.ok(response).build();
} catch (EntityNotFoundException e) { } catch (EntityNotFoundException e) {
if(guids != null || !guids.isEmpty()) { if(guids != null || !guids.isEmpty()) {
LOG.error("An entity with GUID={} does not exist", guids, e); LOG.error("An entity with GUID={} does not exist ", guids, e);
} else { } else {
LOG.error("An entity with qualifiedName {}-{}-{} does not exist", entityType, attribute, value, e); LOG.error("An entity with qualifiedName {}-{}-{} does not exist", entityType, attribute, value, e);
} }
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to delete entities {}", guids, e); LOG.error("Unable to delete entities {} {} {} {} ", guids, entityType, attribute, value, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to delete entities {}", guids, e); LOG.error("Unable to delete entities {} {} {} {} ", guids, entityType, attribute, value, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
} }
} }
...@@ -420,10 +432,10 @@ public class EntityResource { ...@@ -420,10 +432,10 @@ public class EntityResource {
return Response.status(status).entity(response).build(); return Response.status(status).entity(response).build();
} catch (EntityNotFoundException e) { } catch (EntityNotFoundException e) {
LOG.error("An entity with GUID={} does not exist", guid, e); LOG.error("An entity with GUID={} does not exist ", guid, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Bad GUID={}", guid, e); LOG.error("Bad GUID={} ", guid, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to get instance definition for GUID {}", guid, e); LOG.error("Unable to get instance definition for GUID {}", guid, e);
...@@ -564,8 +576,9 @@ public class EntityResource { ...@@ -564,8 +576,9 @@ public class EntityResource {
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE)
public Response addTrait(@Context HttpServletRequest request, @PathParam("guid") final String guid) { public Response addTrait(@Context HttpServletRequest request, @PathParam("guid") final String guid) {
String traitDefinition = null;
try { try {
final String traitDefinition = Servlets.getRequestPayload(request); traitDefinition = Servlets.getRequestPayload(request);
LOG.debug("Adding trait={} for entity={} ", traitDefinition, guid); LOG.debug("Adding trait={} for entity={} ", traitDefinition, guid);
metadataService.addTrait(guid, traitDefinition); metadataService.addTrait(guid, traitDefinition);
...@@ -578,13 +591,13 @@ public class EntityResource { ...@@ -578,13 +591,13 @@ public class EntityResource {
return Response.created(locationURI).entity(response).build(); return Response.created(locationURI).entity(response).build();
} catch (EntityNotFoundException | TypeNotFoundException e) { } catch (EntityNotFoundException | TypeNotFoundException e) {
LOG.error("An entity with GUID={} does not exist", guid, e); LOG.error("An entity with GUID={} does not exist traitDef={} ", guid, traitDefinition, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to add trait for entity={}", guid, e); LOG.error("Unable to add trait for entity={} traitDef={}", guid, traitDefinition, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to add trait for entity={}", guid, e); LOG.error("Unable to add trait for entity={} traitDef={}", guid, traitDefinition, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
} }
} }
...@@ -611,7 +624,7 @@ public class EntityResource { ...@@ -611,7 +624,7 @@ public class EntityResource {
return Response.ok(response).build(); return Response.ok(response).build();
} catch (EntityNotFoundException | TypeNotFoundException e) { } catch (EntityNotFoundException | TypeNotFoundException e) {
LOG.error("An entity with GUID={} does not exist", guid, e); LOG.error("An entity with GUID={} does not exist traitName={} ", guid, traitName, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
} catch (TraitNotFoundException e) { } catch (TraitNotFoundException e) {
LOG.error("The trait name={} for entity={} does not exist.", traitName, guid, e); LOG.error("The trait name={} for entity={} does not exist.", traitName, guid, e);
...@@ -650,10 +663,10 @@ public class EntityResource { ...@@ -650,10 +663,10 @@ public class EntityResource {
response.put(AtlasClient.EVENTS, getJSONArray(events)); response.put(AtlasClient.EVENTS, getJSONArray(events));
return Response.ok(response).build(); return Response.ok(response).build();
} catch (AtlasException | IllegalArgumentException e) { } catch (AtlasException | IllegalArgumentException e) {
LOG.error("Unable to get audit events for entity {}", guid, e); LOG.error("Unable to get audit events for entity guid={} startKey={}", guid, startKey, e);
throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST)); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Unable to get audit events for entity {}", guid, e); LOG.error("Unable to get audit events for entity guid={} startKey={}", guid, startKey, 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