{"record":{"id":"d09160afd25405c8","repo":"phacility/phabricator","slug":"err-unknown-type","errorCode":"ERR-UNKNOWN-TYPE","errorMessage":"ERR-UNKNOWN-TYPE","messagePattern":"ERR-UNKNOWN-TYPE","errorType":"error_code","errorClass":"ConduitException","httpStatus":null,"severity":"error","filePath":"src/applications/feed/conduit/FeedQueryConduitAPIMethod.php","lineNumber":139,"sourceCode":"              'class' => $story_data->getStoryType(),\n              'epoch' => $story_data->getEpoch(),\n              'authorPHID' => $story_data->getAuthorPHID(),\n              'chronologicalKey' => $story_data->getChronologicalKey(),\n              'data' => $story_data->getStoryData(),\n            );\n          break;\n          case 'text':\n            $data = array(\n              'class' => $story_data->getStoryType(),\n              'epoch' => $story_data->getEpoch(),\n              'authorPHID' => $story_data->getAuthorPHID(),\n              'chronologicalKey' => $story_data->getChronologicalKey(),\n              'objectPHID' => $story->getPrimaryObjectPHID(),\n              'text' => $story->renderText(),\n            );\n          break;\n          default:\n            throw new ConduitException('ERR-UNKNOWN-TYPE');\n        }\n\n        $results[$story_data->getPHID()] = $data;\n      }\n    }\n\n    return $results;\n  }\n\n}\n","sourceCodeStart":121,"sourceCodeEnd":150,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/feed/conduit/FeedQueryConduitAPIMethod.php#L121-L150","documentation":"The feed.query Conduit method renders each feed story according to its 'view' parameter. The switch only handles 'html', 'html-summary', 'data', and 'text'; any other value reaches the default case and throws ConduitException('ERR-UNKNOWN-TYPE'). When 'view' is omitted it defaults to 'data', so this error only fires on an explicit bad value.","triggerScenarios":"Calling conduit feed.query with view set to anything besides 'data', 'html', 'html-summary', or 'text' — e.g. 'json', 'summary', 'Html' (case matters), or 'html_summary' (underscore vs hyphen).","commonSituations":"API clients guessing parameter values instead of reading defineParamTypes()/defineErrorTypes(); typos and case mismatches; scripts written against other feed APIs ported to Phabricator; passing an empty-but-present value that is falsy-checked differently.","solutions":["Set view to one of the documented values: 'data' (default), 'html', 'html-summary', or 'text'.","Omit the view parameter entirely if you want the default 'data' rendering.","Check the exact spelling: hyphen in 'html-summary', all lowercase.","Read the method's error types via conduit.method.query for the authoritative list."],"exampleFix":"// before\n$result = $conduit->callMethodSynchronous(\n  'feed.query',\n  array('view' => 'json'));\n\n// after\n$result = $conduit->callMethodSynchronous(\n  'feed.query',\n  array('view' => 'data'));","handlingStrategy":"validation","validationCode":"$valid_views = array('data', 'html', 'html-summary', 'text');\nif (!in_array($view, $valid_views, true)) {\n  $view = 'data'; // or reject the request\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read parameter docs via conduit.method.query rather than guessing values.","Normalize user-supplied view values (lowercase, hyphen) before calling feed.query.","Omit 'view' when the default 'data' rendering is sufficient."],"tags":["phabricator","conduit","feed","invalid-parameter","api","php"],"backgroundTag":"unsupported-view-type","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}