{"record":{"id":"d06d3c319144cafe","repo":"OrchardCMS/OrchardCore","slug":"the-name-argument-is-required","errorCode":null,"errorMessage":"The '${name}' argument is required.","messagePattern":"The '(.+?)' argument is required\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js","lineNumber":318,"sourceCode":"    log(_logLevel, _message) {\n    }\n}\n/** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */\nNullLogger.instance = new NullLogger();\n\n;// CONCATENATED MODULE: ./src/Utils.ts\n// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\n\n// Version token that will be replaced by the prepack command\n/** The version of the SignalR client. */\nconst VERSION = \"8.0.17\";\n/** @private */\nclass Arg {\n    static isRequired(val, name) {\n        if (val === null || val === undefined) {\n            throw new Error(`The '${name}' argument is required.`);\n        }\n    }\n    static isNotEmpty(val, name) {\n        if (!val || val.match(/^\\s*$/)) {\n            throw new Error(`The '${name}' argument should not be empty.`);\n        }\n    }\n    static isIn(val, values, name) {\n        // TypeScript enums have keys for **both** the name and the value of each enum member on the type itself.\n        if (!(val in values)) {\n            throw new Error(`Unknown ${name} value: ${val}.`);\n        }\n    }\n}\n/** @private */\nclass Platform {\n    // react-native has a window but no document so we should check both\n    static get isBrowser() {","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js#L300-L336","documentation":"The SignalR client's Arg.isRequired static helper throws when a required argument is null or undefined. This is an internal argument-validation guard used throughout @microsoft/signalr constructors and methods.","triggerScenarios":"Calling a SignalR API (e.g. new HubConnectionBuilder(), withUrl(url), HubConnection constructor) passing null/undefined for a required parameter such as the URL, IHttpConnectionOptions, or a delegate.","commonSituations":"Config value not loaded yet (connection URL undefined), typos in variable names, calling API before initialization in SPA bundles.","solutions":["Ensure the connection URL / options object is defined before building the connection","Log or validate arguments before calling SignalR APIs","Fix config loading order so the URL resolves first"],"exampleFix":"// before\nconst conn = new signalR.HubConnectionBuilder().withUrl(hubUrl).build(); // hubUrl undefined\n// after\nif (!hubUrl) throw new Error('hubUrl missing'); const conn = new signalR.HubConnectionBuilder().withUrl(hubUrl).build();","handlingStrategy":"validation","validationCode":"if (url == null || url === undefined) throw new Error('connection URL must be set before building the hub connection');","typeGuard":"const isDefined = (v) => v !== null && v !== undefined;","tryCatchPattern":"try { conn = new signalR.HubConnectionBuilder().withUrl(url).build(); } catch (e) { if (e.message.includes(\"argument is required\")) { console.error('Missing required SignalR argument:', e.message); } }","preventionTips":["Resolve config before initializing the connection","Assert required values at app bootstrap","Avoid passing possibly-undefined variables directly into SignalR APIs"],"tags":["javascript","signalr","null-argument","validation"],"backgroundTag":"missing-required-argument","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"}