def get_error_msg() -> str:
    """
    (inspired on Superset code)
    :return: (str)
    """
    if current_app.config.get("FAB_API_SHOW_STACKTRACE"):
        return traceback.format_exc()
    return "Fatal error"

    (inspired on Superset code)
    :return: (str)
    
flask_appbuilder/api/__init__.py