{"record":{"id":"ef9040604df74893","repo":"sveltejs/kit","slug":"cannot-use-reserved-action-name-default","errorCode":null,"errorMessage":"Cannot use reserved action name \"default\"","messagePattern":"Cannot use reserved action name \"default\"","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/kit/src/runtime/server/page/actions.js","lineNumber":229,"sourceCode":"\t\t);\n\t}\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {NonNullable<ServerNode['actions']>} actions\n * @throws {Redirect | HttpError | SvelteKitError | Error}\n */\nasync function call_action(event, state, actions) {\n\tconst url = new URL(event.request.url);\n\n\tlet name = 'default';\n\tfor (const param of url.searchParams) {\n\t\tif (param[0].startsWith('/')) {\n\t\t\tname = param[0].slice(1);\n\t\t\tif (name === 'default') {\n\t\t\t\tthrow new Error('Cannot use reserved action name \"default\"');\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!Object.hasOwn(actions, name)) {\n\t\tthrow new SvelteKitError(404, 'Not Found', `No action with name '${name}' found`);\n\t}\n\n\tconst action = actions[name];\n\n\tif (!is_form_content_type(event.request)) {\n\t\tthrow new SvelteKitError(\n\t\t\t415,\n\t\t\t'Unsupported Media Type',\n\t\t\t`Form actions expect form-encoded data — received ${event.request.headers.get(\n\t\t\t\t'content-type'\n\t\t\t)}`","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/kit/src/runtime/server/page/actions.js#L211-L247","documentation":"Form-action dispatch check in call_action: the action name is taken from a url search param starting with '/'; if that name is literally 'default' (?/default), it is rejected because 'default' is reserved for the unnamed action and cannot be explicitly addressed when named actions exist.","triggerScenarios":"Thrown at packages/kit/src/runtime/server/page/actions.js:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the /default query parameter to invoke the default action implicitly","Rename the action to something other than 'default' and use ?/newname"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"03f1687fe612ce3d2d9131139b5b188d9cf90c64","analyzedAt":"2026-09-02T02:01:50.504Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}