[rest] Suppress error message in REST response (#1307)

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
Christoph Weitkamp 2020-01-09 12:36:54 +01:00 committed by Wouter Born
parent a8232e4b1c
commit 7e3e333dbc

View File

@ -173,7 +173,7 @@ public class JSONResponse {
gson.toJson(entity, entity.getClass(), jsonWriter);
jsonWriter.flush();
} catch (IOException | JsonIOException e) {
logger.error("Error streaming JSON through PipedInpuStream/PipedOutputStream: ", e);
logger.debug("Error streaming JSON through PipedInputStream / PipedOutputStream.", e);
}
});
@ -193,13 +193,9 @@ public class JSONResponse {
private final Logger logger = LoggerFactory.getLogger(ExceptionMapper.class);
/**
* create JSON Response
*/
@Override
public Response toResponse(Exception e) {
logger.debug("exception during REST Handling", e);
logger.debug("Exception during REST handling.", e);
Response.StatusType status = Response.Status.INTERNAL_SERVER_ERROR;