docs: def format_error(e):
      """Take an exception caught within pymacaron_core and turn it into a
      bravado-core Error instance
      """
  
      if isinstance(e, PyMacaronException):
          return e.to_model()
  
      if isinstance(e, PyMacaronCoreException) and e.__class__.__name__ == 'ValidationError':
          return ValidationError(str(e)).to_model()
  
      # Turn this exception into a PyMacaron Error model
      return UnhandledServerError(str(e)).to_model()