{"record":{"id":"4ec019065c134540","repo":"ShareX/ShareX","slug":"request-url-must-be-configured","errorCode":null,"errorMessage":"\"Request URL\" must be configured.","messagePattern":"\"Request URL\" must be configured\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"ShareX.UploadersLib/CustomUploader/CustomUploaderItem.cs","lineNumber":137,"sourceCode":"\r\n            if (!string.IsNullOrEmpty(name))\r\n            {\r\n                return name;\r\n            }\r\n\r\n            return \"Name\";\r\n        }\r\n\r\n        public string GetFileName()\r\n        {\r\n            return ToString() + \".sxcu\";\r\n        }\r\n\r\n        public string GetRequestURL(CustomUploaderInput input)\r\n        {\r\n            if (string.IsNullOrEmpty(RequestURL))\r\n            {\r\n                throw new Exception(Localization.Strings.CustomUploaderItem_Request_URL_must_be_configured);\r\n            }\r\n\r\n            ShareXCustomUploaderSyntaxParser parser = new ShareXCustomUploaderSyntaxParser(input);\r\n            parser.URLEncode = true;\r\n            string url = parser.Parse(RequestURL);\r\n\r\n            url = URLHelpers.FixPrefix(url);\r\n\r\n            Dictionary<string, string> parameters = GetParameters(input);\r\n            return URLHelpers.CreateQueryString(url, parameters);\r\n        }\r\n\r\n        public Dictionary<string, string> GetParameters(CustomUploaderInput input)\r\n        {\r\n            Dictionary<string, string> parameters = new Dictionary<string, string>();\r\n\r\n            if (Parameters != null)\r\n            {\r","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/ShareX/ShareX/blob/f7d4b6bfbf58c0553c01fb038347deec54c0cc7a/ShareX.UploadersLib/CustomUploader/CustomUploaderItem.cs#L119-L155","documentation":"Thrown by CustomUploaderItem.GetRequestURL when the RequestURL property is null or empty. A custom uploader definition must declare where to send the upload, so an empty RequestURL is rejected before any URL parsing/formatting occurs.","triggerScenarios":"Loading a .sxcu custom uploader file whose RequestURL field was never set or was cleared; programmatically constructing a CustomUploaderItem without setting RequestURL and then calling GetRequestURL.","commonSituations":"Hand-edited .sxcu JSON missing the RequestURL key; importer created an incomplete item; user cleared the URL field in the editor but saved.","solutions":["Set a valid RequestURL (including {placeholders} if needed) on the CustomUploaderItem.","Validate the .sxcu payload has a non-empty RequestURL before adding it to the uploader list.","Surface the missing-field error in the custom uploader editor at save time."],"exampleFix":"// before\nif (string.IsNullOrEmpty(RequestURL)) throw new Exception(\"\\\"Request URL\\\" must be configured.\");\n\n// after\nif (string.IsNullOrWhiteSpace(RequestURL))\n    throw new InvalidOperationException(\"Custom uploader 'Request URL' is empty. Open the uploader settings and set it.\");","handlingStrategy":"validation","validationCode":"if (string.IsNullOrWhiteSpace(item.RequestURL))\n    throw new InvalidOperationException(\"Custom uploader 'Request URL' is not set.\");","typeGuard":"static bool HasRequestUrl(CustomUploaderItem i) => !string.IsNullOrWhiteSpace(i?.RequestURL);","tryCatchPattern":"try { url = item.GetRequestURL(input); }\ncatch (Exception ex) when (ex.Message.Contains(\"Request URL\"))\n{ /* open editor, require RequestURL, then retry */ }","preventionTips":["Validate .sxcu payloads have a non-empty RequestURL before import.","Make RequestURL a required field in the editor UI.","Refuse to save an uploader definition missing required fields."],"tags":["custom-uploader","validation","configuration"],"backgroundTag":null,"analyzedSha":"f7d4b6bfbf58c0553c01fb038347deec54c0cc7a","analyzedAt":"2026-08-13T10:23:46.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}