return Response.serverError().entity(buildJSONResponse("message", e.getMessage())).build();
}
}
+
+ @Path("{uuid}/error")
+ @POST
+ public Response error(@PathParam("uuid") String uuid, Map<String, Object> payload) {
+
+ try {
+ AuditLogging.error(uuid, payload);
+ return Response.ok().build();
+ } catch (AuditLoggingException e) {
+ LOGGER.error("Could not log error audit with id {}", uuid, e);
+ return Response.serverError().entity(buildJSONResponse("message", e.getMessage())).build();
+ }
+ }
}