def METHOD_NAME(snap_name):
    data = flask.request.json
    if not data:
        return flask.jsonify({}), 400
    try:
        snap_id = publisher_api.get_snap_id(snap_name, flask.session)
    except StoreApiResponseErrorList as api_response_error_list:
        if api_response_error_list.status_code == 404:
            return flask.abort(404, "No snap named {}".format(snap_name))
        else:
            return flask.jsonify(api_response_error_list.errors), 400
    try:
        publisher_api.snap_metadata(snap_id, flask.session, data)
    except StoreApiResponseErrorList as api_response_error_list:
        if api_response_error_list.status_code == 404:
            return flask.abort(404, "No snap named {}".format(snap_name))
        else:
            response = {
                "errors": api_response_error_list.errors,
                "success": False,
            }
            return flask.jsonify(response), 400
    return flask.jsonify({"success": True})