class ResponseUtil {
    public static <T> ResponseEntity<T> getSuccessResponse(T result) {
        return ResponseEntity.ok().body(result);
    }

    public static <T> ResponseEntity<T> getFailureResponse(T result) {
        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(result);
    }

    public static ResponseEntity<String> getFailureResponse(Exception e) {
        String message = getFailureMessage(e);

        return getFailureResponse(message);
    }

    public static String getFailureMessage(Exception e) {
        return getFailureMessage(e, false);
    }

    public static String getFailureMessage(Exception e, boolean detailed) {<FILL_FUNCTION_BODY>}
}

        String message = null;
        if (detailed) {
            message = ExceptionUtils.getStackTrace(e);
        } else {
            message = e.getMessage();
        }

        // message = "An internal error occurred while processing your request\n" + message;

        return message;
    
<no_super_class>