{"record":{"id":"83b2bb30b914dc4b","repo":"OrchardCMS/OrchardCore","slug":"no-url-defined","errorCode":null,"errorMessage":"No url defined.","messagePattern":"No url defined\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js","lineNumber":609,"sourceCode":"            const requireFunc =  true ? require : 0;\n            // Node needs EventListener methods on AbortController which our custom polyfill doesn't provide\n            this._abortControllerType = requireFunc(\"abort-controller\");\n        }\n        else {\n            this._abortControllerType = AbortController;\n        }\n    }\n    /** @inheritDoc */\n    async send(request) {\n        // Check that abort was not signaled before calling send\n        if (request.abortSignal && request.abortSignal.aborted) {\n            throw new AbortError();\n        }\n        if (!request.method) {\n            throw new Error(\"No method defined.\");\n        }\n        if (!request.url) {\n            throw new Error(\"No url defined.\");\n        }\n        const abortController = new this._abortControllerType();\n        let error;\n        // Hook our abortSignal into the abort controller\n        if (request.abortSignal) {\n            request.abortSignal.onabort = () => {\n                abortController.abort();\n                error = new AbortError();\n            };\n        }\n        // If a timeout has been passed in, setup a timeout to call abort\n        // Type needs to be any to fit window.setTimeout and NodeJS.setTimeout\n        let timeoutId = null;\n        if (request.timeout) {\n            const msTimeout = request.timeout;\n            timeoutId = setTimeout(() => {\n                abortController.abort();\n                this._logger.log(LogLevel.Warning, `Timeout from HTTP request.`);","sourceCodeStart":591,"sourceCodeEnd":627,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js#L591-L627","documentation":"FetchHttpClient.send throws 'No url defined.' when the HttpRequest's url property is empty or undefined. Every outgoing SignalR HTTP request must carry a target URL. The library fails fast rather than letting fetch throw a more obscure error.","triggerScenarios":"Creating an HttpRequest without a url; passing an empty string or undefined to HttpConnection constructor's url; a custom transport calling send() with a request built without the endpoint.","commonSituations":"Misconfigured hub URL from appsettings/environment (empty value); concatenating a base URL that is undefined so the result is 'undefined/negotiate' or ''; using connectAsync-style helpers where the hub name is misspelled.","solutions":["Pass a valid absolute or relative hub URL to withUrl(): `new HubConnectionBuilder().withUrl('/hubs/chat')`","Log/inspect the URL before send and fail early if falsy","Check configuration sources (env vars, appsettings) that supply the hub base URL"],"exampleFix":"// before\nconst hubUrl = config.hubBase + '/chat'; // config.hubBase undefined -> 'undefined/chat'\n// after\nconst hubUrl = (config.hubBase ?? 'https://example.com') + '/chat';\nif (!hubUrl) throw new Error('Hub URL not configured');","handlingStrategy":"validation","validationCode":"if (!request?.url) throw new Error('request.url required');","typeGuard":"const hasUrl = (r) => typeof r?.url === 'string' && r.url.length > 0;","tryCatchPattern":"try { await client.send(request); } catch (e) { if (e.message === 'No url defined.') logConfigError(); }","preventionTips":["Resolve hub URL from config with a fallback default and fail fast if empty","Log the final URL before connecting","Avoid string-concatenating possibly-undefined base URLs (use URL constructor)"],"tags":["http","url","signalr","config"],"backgroundTag":"invalid-url","analyzedSha":"4306c0717fe573f6fca1b4955909ddab6a192807","analyzedAt":"2026-09-13T17:41:05.024Z","contentChangedAt":"2026-09-13T17:41:05.024Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}