ppy/osu · error · NotSupportedException

Beatmap submission not supported in this configuration!

Error message

Beatmap submission not supported in this configuration!

What it means

Thrown by PatchBeatmapPackageRequest.Uri getter when API.Endpoints.BeatmapSubmissionServiceUrl is null. The patch-upload endpoint is only valid when the submission service URL is configured; the comment notes this guard can be removed once the service is deployed to production. It is a NotSupportedException, signalling the feature is unavailable in the current client configuration.

Source

Thrown at osu.Game/Online/API/Requests/PatchBeatmapPackageRequest.cs:19

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using System.Net.Http;
using osu.Framework.IO.Network;

namespace osu.Game.Online.API.Requests
{
    public class PatchBeatmapPackageRequest : APIUploadRequest
    {
        protected override string Uri
        {
            get
            {
                // can be removed once the service has been successfully deployed to production
                if (API!.Endpoints.BeatmapSubmissionServiceUrl == null)
                    throw new NotSupportedException("Beatmap submission not supported in this configuration!");

                return $@"{API!.Endpoints.BeatmapSubmissionServiceUrl!}/beatmapsets/{BeatmapSetID}";
            }
        }

        protected override string Target => throw new NotSupportedException();

        public uint BeatmapSetID { get; }

        public Dictionary<string, byte[]> FilesChanged { get; } = new Dictionary<string, byte[]>();

        public HashSet<string> FilesDeleted { get; } = new HashSet<string>();

        public PatchBeatmapPackageRequest(uint beatmapSetId)
        {
            BeatmapSetID = beatmapSetId;
        }

View on GitHub (pinned to d9c73e12ad)

Solutions

  1. Configure API.Endpoints.BeatmapSubmissionServiceUrl to the service base URL before enabling submission flows.
  2. Gate the UI/flow that constructs PatchBeatmapPackageRequest on BeatmapSubmissionServiceUrl != null.
  3. Once the service is in production, remove the guard as the comment instructs.

Example fix

// before
var req = new PatchBeatmapPackageRequest(...);
api.Perform(req); // throws NotSupportedException in Uri getter

// after
if (string.IsNullOrEmpty(api.Endpoints.BeatmapSubmissionServiceUrl))
{
    Notifications.Post(new SimpleNotification { Text = "Beatmap submission is not available." });
    return;
}
var req = new PatchBeatmapPackageRequest(...);
api.Perform(req);
Defensive patterns

Strategy: validation

Validate before calling

if (string.IsNullOrEmpty(api.Endpoints.BeatmapSubmissionServiceUrl))
{ /* disable patch-submission UI, notify user */ return; }
var req = new PatchBeatmapPackageRequest(...);

Type guard

static bool IsSubmissionEnabled(IAPIEndpointProvider endpoints)
    => !string.IsNullOrWhiteSpace(endpoints.BeatmapSubmissionServiceUrl);

Try / catch

try { api.Perform(new PatchBeatmapPackageRequest(...)); }
catch (NotSupportedException ex) when (ex.Message.Contains("Beatmap submission"))
{ /* show 'feature unavailable in this build' */ }

Prevention

When it happens

Trigger: Constructing/accessing a PatchBeatmapPackageRequest (patching files of an existing beatmap set) while BeatmapSubmissionServiceUrl is not set in the API endpoints. The Uri getter is evaluated when the request is performed.

Common situations: A build/endpoint configuration where the submission service isn't enabled; a development environment without the service; the editor's beatmap submission flow invoked before the service is rolled out.

Related errors


AI-assisted analysis of ppy/osu@d9c73e12ad (2026-08-13). Data as JSON: /api/errors/8caa33308175c500. Report an issue: GitHub.