{"record":{"id":"544b7fe99ba76caa","repo":"ppy/osu","slug":"beatmap-submission-not-supported-in-this-configura-544b7f","errorCode":null,"errorMessage":"Beatmap submission not supported in this configuration!","messagePattern":"Beatmap submission not supported in this configuration!","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"osu.Game/Online/API/Requests/PutBeatmapSetRequest.cs","lineNumber":26,"sourceCode":"using Newtonsoft.Json;\r\nusing Newtonsoft.Json.Converters;\r\nusing osu.Framework.IO.Network;\r\nusing osu.Framework.Localisation;\r\nusing osu.Game.Localisation;\r\nusing osu.Game.Online.API.Requests.Responses;\r\nusing osu.Game.Screens.Edit.Submission;\r\n\r\nnamespace osu.Game.Online.API.Requests\r\n{\r\n    public class PutBeatmapSetRequest : APIRequest<PutBeatmapSetResponse>\r\n    {\r\n        protected override string Uri\r\n        {\r\n            get\r\n            {\r\n                // can be removed once the service has been successfully deployed to production\r\n                if (API!.Endpoints.BeatmapSubmissionServiceUrl == null)\r\n                    throw new NotSupportedException(\"Beatmap submission not supported in this configuration!\");\r\n\r\n                return $@\"{API!.Endpoints.BeatmapSubmissionServiceUrl}/beatmapsets\";\r\n            }\r\n        }\r\n\r\n        protected override string Target => throw new NotSupportedException();\r\n\r\n        [JsonProperty(\"beatmapset_id\")]\r\n        public uint? BeatmapSetID { get; init; }\r\n\r\n        [JsonProperty(\"beatmaps_to_create\")]\r\n        public uint BeatmapsToCreate { get; init; }\r\n\r\n        [JsonProperty(\"beatmaps_to_keep\")]\r\n        public uint[] BeatmapsToKeep { get; init; } = [];\r\n\r\n        [JsonProperty(\"target\")]\r\n        public BeatmapSubmissionTarget SubmissionTarget { get; init; }\r","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/ppy/osu/blob/d9c73e12adff2feaae4a3e158d36fe5883faf6ca/osu.Game/Online/API/Requests/PutBeatmapSetRequest.cs#L8-L44","documentation":"Thrown by PutBeatmapSetRequest.Uri getter when API.Endpoints.BeatmapSubmissionServiceUrl is null. PutBeatmapSetRequest creates a beatmapset (PUT /beatmapsets); without the submission service URL the request has no valid target and the getter throws NotSupportedException. Note the Target property also throws NotSupportedException as a secondary guard.","triggerScenarios":"Performing a PutBeatmapSetRequest (create new beatmapset submission) when BeatmapSubmissionServiceUrl is unconfigured. The Uri getter is hit during request execution.","commonSituations":"Editor 'submit beatmap' flow on a build where the submission service endpoint isn't set; dev/staging configs missing the URL; the feature enabled in code before deployment.","solutions":["Set API.Endpoints.BeatmapSubmissionServiceUrl before exposing/using the submission flow.","Disable the submission UI entry point when BeatmapSubmissionServiceUrl is null.","Post-deployment, remove the guard per the inline comment."],"exampleFix":"// before\nvar req = new PutBeatmapSetRequest { ... };\napi.Perform(req); // NotSupportedException from Uri getter\n\n// after\nif (api.Endpoints.BeatmapSubmissionServiceUrl == null)\n{\n    submissionButton.Enabled.Value = false;\n    return;\n}\nvar req = new PutBeatmapSetRequest { ... };\napi.Perform(req);","handlingStrategy":"validation","validationCode":"if (api.Endpoints.BeatmapSubmissionServiceUrl == null)\n{ submissionButton.Enabled.Value = false; return; }\nvar req = new PutBeatmapSetRequest { ... };","typeGuard":"static bool IsSubmissionEnabled(IAPIEndpointProvider endpoints)\n    => !string.IsNullOrWhiteSpace(endpoints.BeatmapSubmissionServiceUrl);","tryCatchPattern":"try { api.Perform(req); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"Beatmap submission\"))\n{ /* 'submission unavailable' notification */ }","preventionTips":["Bind the create-submission button's Enabled to BeatmapSubmissionServiceUrl != null.","Configure endpoints before enabling the submission flow in any build.","Clean up the guard post-production rollout."],"tags":["api","beatmap-submission","configuration","network","endpoints"],"backgroundTag":null,"analyzedSha":"d9c73e12adff2feaae4a3e158d36fe5883faf6ca","analyzedAt":"2026-08-13T14:12:54.015Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}