{"record":{"id":"a344841cd43749ff","repo":"octobercms/october","slug":"snackbar-options-action-callback-must-be-a-functio","errorCode":null,"errorMessage":"Snackbar options.action.callback must be a function","messagePattern":"Snackbar options\\.action\\.callback must be a function","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/js/october/october.snackbar.js","lineNumber":60,"sourceCode":"                    throw new Error('Snackbar options.timeout cannot be lower than 2000');\n                }\n\n                if (options.timeout > 8000) {\n                    throw new Error('Snackbar options.timeout cannot be higher than 8000');\n                }\n            }\n\n            if (options.action !== undefined) {\n                if (typeof options.action !== 'object') {\n                    throw new Error('Snackbar options.action must be an object');\n                }\n\n                if (typeof options.action.label !== 'string') {\n                    throw new Error('Snackbar options.action.label must be a string');\n                }\n\n                if (typeof options.action.callback !== 'function') {\n                    throw new Error('Snackbar options.action.callback must be a function');\n                }\n            }\n        }\n\n        function runQueue() {\n            if (displayedMessage !== null) {\n                return;\n            }\n\n            var parameters = queue.shift();\n            if (parameters === undefined) {\n                return;\n            }\n\n            buildSnackbar(parameters);\n        }\n\n        function makeUniqueId() {","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/js/october/october.snackbar.js#L42-L78","documentation":"Final action check in validateOptions: options.action.callback must be a function invoked when the snackbar button is pressed; a missing or non-function callback throws. The action object is incomplete or malformed.","triggerScenarios":"Thrown at modules/backend/assets/js/october/october.snackbar.js:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Attach a function to action.callback, e.g. callback: function() { ... }","Ensure the callback reference isn't a string method name or undefined"],"exampleFix":null,"handlingStrategy":"type-guard","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"}