code: def exception_log_and_respond(exception, logger, message, status_code):
      
      logger.error(message, exc_info=True)
      return make_response(
          message,
          status_code,
          dict(exception_type=type(exception).__name__, exception_message=str(exception)),
      )
docs: Log an error and send jsonified respond.