{"record":{"id":"5298ffb3d07b471a","repo":"usebruno/bruno","slug":"unsupported-item-type-item-type-5298ff","errorCode":null,"errorMessage":"Unsupported item type: ${item.type}","messagePattern":"Unsupported item type: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-filestore/src/formats/yml/stringifyItem.ts","lineNumber":34,"sourceCode":"        return stringifyGraphqlRequest(item);\n\n      case 'grpc-request':\n        return stringifyGrpcRequest(item);\n\n      case 'ws-request':\n        return stringifyWebsocketRequest(item);\n\n      case 'js':\n        return stringifyScript(item);\n\n      case 'app':\n        return stringifyApp(item);\n\n      case 'folder':\n        throw new Error('Folder items should be handled separately using stringifyFolder');\n\n      default:\n        throw new Error(`Unsupported item type: ${item.type}`);\n    }\n  } catch (error) {\n    console.error('Error stringifying item:', error);\n    throw error;\n  }\n};\nexport default stringifyItem;\n","sourceCodeStart":16,"sourceCodeEnd":42,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-filestore/src/formats/yml/stringifyItem.ts#L16-L42","documentation":"`stringifyItem` switches on `item.type` and supports `http-request|graphql-request|grpc-request|ws-request|js|app`; it throws on `folder` and falls through to a default for anything else. This is the serialization-side mirror of the parse error, keyed on Bruno's internal runtime item types.","triggerScenarios":"Passing an item object whose `.type` is not one of the supported serialization types (and not `folder`), e.g. an unknown/unsupported runtime item or a folder handed to `stringifyItem`.","commonSituations":"A new item type was added to the runtime model without a matching `stringifyX`; passing a folder object to `stringifyItem` instead of `stringifyFolder`; a malformed item object missing/with a wrong `.type`; version skew between the schema package and filestore.","solutions":["Confirm `item.type` is one of: http-request, graphql-request, grpc-request, ws-request, js, app.","Use `stringifyFolder` for folder objects.","Upgrade bruno-filestore / schema packages together so all item types have serializers.","Construct items through the official factories rather than ad-hoc literals."],"exampleFix":"// before\nstringifyItem({ type: 'http', ... });   // wrong type value\n\n// after\nstringifyItem({ type: 'http-request', ... });","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['http-request','graphql-request','grpc-request','ws-request','js','app']);\nfunction assertStringifiableType(t) {\n  if (!SUPPORTED.has(t)) throw new Error(`Unsupported item type: ${t}`);\n}","typeGuard":"const STRINGIFY_TYPES = ['http-request','graphql-request','grpc-request','ws-request','js','app'] as const;\ntype StringifyType = typeof STRINGIFY_TYPES[number];\nfunction isStringifyType(t: unknown): t is StringifyType {\n  return typeof t === 'string' && (STRINGIFY_TYPES as readonly string[]).includes(t);\n}","tryCatchPattern":"try { stringifyItem(item); }\ncatch (e) { if (/Unsupported item type/.test(e.message)) { /* route to stringifyFolder or upgrade */ } else throw e; }","preventionTips":["Use stringifyFolder for folders.","Upgrade filestore alongside the schema/types packages.","Build items via official factories so .type is always valid."],"tags":["filestore","yaml","serialization","schema","typescript"],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}