{"record":{"id":"48dcade906fdae6e","repo":"balderdashy/sails","slug":"ignoring-unexpected-property-in-one-of-the-exits-o","errorCode":null,"errorMessage":"Ignoring unexpected property in one of the exits of the helper definition loaded from ${helperDef._loadedFrom}.  Features like `responseType`, `viewTemplatePath`, and `statusCode` can only be used by actions, not by helpers!","messagePattern":"Ignoring unexpected property in one of the exits of the helper definition loaded from (.+?)\\.  Features like `responseType`, `viewTemplatePath`, and `statusCode` can only be used by actions, not by helpers!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/hooks/helpers/private/load-helpers.js","lineNumber":84,"sourceCode":"              'from '+helperDef._loadedFrom+'.  This feature can only be used '+\n              'by actions, not by helpers!'\n            );\n          }\n          var hasAnyConfusingExitProps = (\n            _.isObject(helperDef.exits) &&\n            _.any(helperDef.exits, function(exitDef){\n              return (\n                _.isObject(exitDef) &&\n                (\n                  exitDef.responseType !== undefined ||\n                  exitDef.viewTemplatePath !== undefined ||\n                  exitDef.statusCode !== undefined\n                )\n              );\n            })\n          );\n          if (hasAnyConfusingExitProps) {\n            sails.log.warn(\n              'Ignoring unexpected property in one of the exits of the helper '+\n              'definition loaded from '+helperDef._loadedFrom+'.  Features like '+\n              '`responseType`, `viewTemplatePath`, and `statusCode` can only be '+\n              'used by actions, not by helpers!'\n            );\n          }\n\n          // Build & expose helper on `sails.helpers`\n          // > e.g. sails.helpers.userHelpers.foo.myHelper\n          sails.hooks.helpers.furnishHelper(keyPath, helperDef);\n        } catch (err) {\n          // If an error occurs building the callable, throw here to bust\n          // out of the _.each loop early\n          throw flaverr({\n            code: 'E_FAILED_TO_BUILD_CALLABLE',\n            identity: helperDef.identity,\n            loadedFrom: identity,\n            raw: err","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/hooks/helpers/private/load-helpers.js#L66-L102","documentation":"Exit definitions in helpers may not use action-only properties such as `responseType`, `viewTemplatePath`, or `statusCode`. If any exit of a loaded helper defines one of these, the helpers hook logs this warning identifying the source file, and the offending property is ignored. These features control HTTP responses, which only actions produce.","triggerScenarios":"A helper's exits dictionary includes e.g. exits.badRequest = { responseType: 'badRequest' } or { statusCode: 400 } or { viewTemplatePath: '...' }, detected by hasAnyConfusingExitProps during helper loading.","commonSituations":"Copy-pasting exit definitions from actions into helpers, assuming helper exits behave like action exits for response negotiation, or migrating legacy response-handling code into helpers.","solutions":["Remove responseType/viewTemplatePath/statusCode from the helper's exit definitions.","Handle response customization in the calling action: switch on the helper's exits (exits: { badRequest: { responseType: 'badRequest' } } on the action side).","Keep helper exits plain (description-only) and let actions decide how to respond."],"exampleFix":"// before (helper exits)\nexits: { notFound: { responseType: 'notFound', statusCode: 404 } }\n// after (helper)\nexits: { notFound: { description: 'Record not found.' } }\n// ...and in the calling action: exits: { notFound: { responseType: 'notFound' } }","handlingStrategy":"validation","validationCode":"const actionOnly = ['responseType', 'viewTemplatePath', 'statusCode'];\nfor (const [name, exit] of Object.entries(helperDef.exits || {})) {\n  const offending = actionOnly.filter(k => exit[k] !== undefined);\n  if (offending.length) console.warn(`Exit '${name}' uses action-only props: ${offending}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep helper exit definitions to descriptions only.","Put response customization (statusCode, responseType, views) in the calling action's exits.","When refactoring actions into helpers, strip HTTP-specific exit properties."],"tags":["helpers","exits","actions2","api-misuse"],"backgroundTag":"invalid-helper-property","analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}