{"record":{"id":"9537d3fe25e42de3","repo":"octobercms/october","slug":"modal-title-is-required","errorCode":null,"errorMessage":"Modal title is required","messagePattern":"Modal title is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/vuecomponents/modal/assets/js/classes/utils.js","lineNumber":25,"sourceCode":"            if (typeof options !== 'object') {\n                throw new Error('options must be an object');\n            }\n\n            if (options.buttonText && typeof options.buttonText !== 'string') {\n                throw new Error('options.buttonText must be a string');\n            }\n\n            if (options.size && typeof options.size !== 'string') {\n                throw new Error('options.size must be a string');\n            }\n        }\n\n        return options || {};\n    }\n\n    #validateBasicArguments(title, text) {\n        if (typeof title !== 'string' || !title.length) {\n            throw new Error('Modal title is required');\n        }\n\n        if (typeof text !== 'string' || !text.length) {\n            throw new Error('Modal text is required');\n        }\n    }\n\n    showAlert(title, text, options) {\n        options = this.#validateAlertOptions(options);\n        this.#validateBasicArguments(title, text);\n\n        return new Promise((resolve, reject) => {\n            // Create container element for Vue app\n            const wrapperEl = document.createElement('div');\n            document.body.appendChild(wrapperEl);\n\n            // Create Vue 3 app\n            const app = oc.createVueApp({","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/vuecomponents/modal/assets/js/classes/utils.js#L7-L43","documentation":"Argument validation in ModalUtils' #validateBasicArguments, shared by showAlert/showBasic/showConfirm: the title parameter is not a non-empty string. Every modal requires a textual title; undefined, empty, or non-string titles are rejected before the dialog is created.","triggerScenarios":"Thrown at modules/backend/vuecomponents/modal/assets/js/classes/utils.js:25 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty string as the title argument","If no title is natural for the dialog, supply a short descriptive label rather than an empty value"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}