package org.superdev.coddy.application.exception.mapper;

import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;

@Provider
public class ExceptMapper implements ExceptionMapper<Exception> {

    @Override
    public Response toResponse(Exception e) {
        return Response.status(Response.Status.INTERNAL_SERVER_ERROR)
                .entity(new org.superdev.coddy.application.data.Response(org.superdev.coddy.application.data.Response.INTERNAL_ERROR))
                .type(MediaType.APPLICATION_JSON)
                .build();
    }
}

@@ -51,16 +51,74 @@
 apper;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A
 import j
@@ -329,16 +329,103 @@
 ion%3E %7B%0A%0A
+    private static final Logger LOGGER = LoggerFactory.getLogger(ExceptMapper.class);%0A%0A
     @Ove
@@ -476,16 +476,57 @@
 on e) %7B%0A
+        LOGGER.debug(e.getMessage(), e);%0A
         

add a log in exceptMapper