@Override
    @SuppressWarnings("Slf4jFormatShouldBeConst")
    protected void logException(long id, JdbiException exception) {
        final Throwable cause = exception.getCause();
        if (cause instanceof SQLException) {
            for (Throwable throwable : (SQLException) cause) {
                logger.error(formatLogMessage(id, throwable), throwable);
            }
        } else {
            logger.error(formatLogMessage(id, exception), exception);
        }
    }
@Test
    void testPlainJdbiException() throws Exception {
        JdbiException jdbiException = new TransactionException("Transaction failed for unknown reason");

        jdbiExceptionMapper.logException(9812, jdbiException);

        verify(logger).error("Error handling a request: 0000000000002654", jdbiException);
    }