{"record":{"id":"6c64843057775af8","repo":"OrchardCMS/OrchardCore","slug":"msg-6c6484","errorCode":null,"errorMessage":"msg","messagePattern":"msg","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Vendor/jquery-3.5.1/jquery.slim.js","lineNumber":334,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Vendor/jquery-3.5.1/jquery.slim.js#L316-L352","documentation":"The slim build's jQuery.error helper throws a new Error with the given message — same generic failure mechanism as the full build. This line is merely the throw site; the meaningful information is the message string and the jQuery API that invoked $.error in the stack below this frame.","triggerScenarios":"Any jQuery (slim) internal path that detects invalid input and calls $.error(message): malformed markup passed to html(), unsupported arguments, or propagated failures inside deferred chains.","commonSituations":"Debugging a stack whose top frame is this $.error helper; the actual bad call site is the next stack frame, and the specific reason is in e.message.","solutions":["Read e.message and the following stack frames to find which jQuery call raised the error; correct the arguments there.","Wrap the suspicious jQuery call in try/catch to capture and log the message for diagnosis.","If the failure appeared after switching to the slim build, remember ajax/effects APIs are absent — calling removed/undefined helpers can cascade into $.error paths; use the full build or adjust code."],"exampleFix":"// before\n$('#box').html(template); // error surfaces via $.error\n// after\ntry {\n  $('#box').html(template);\n} catch (e) {\n  console.error('jQuery (slim) failed:', e.message);\n}","handlingStrategy":"try-catch","validationCode":"if (!isNonEmptyString(input)) throw new Error('Invalid input before jQuery call');\nfunction isNonEmptyString(v) { return typeof v === 'string' && v.length > 0; }","typeGuard":"function isStringOrNode(v) { return typeof v === 'string' || (v && v.nodeType === 1); }","tryCatchPattern":"try { $('#x').html(markup); } catch (e) { logError('jQuery slim $.error:', e.message, e.stack); }","preventionTips":["Trace past the $.error frame; the caller frame holds the real cause.","Validate markup/selector strings before passing them to jQuery.","If migrating from full to slim build, audit removed ajax/effects usage.","Capture full stack traces in error reporting to avoid dead-end debugging."],"tags":["jquery","slim","error-helper","runtime"],"backgroundTag":"invalid-argument-value","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"}