{"record":{"id":"80f3c706403c9f28","repo":"usebruno/bruno","slug":"collection-not-found","errorCode":null,"errorMessage":"Collection not found","messagePattern":"Collection not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js","lineNumber":216,"sourceCode":"            collectionUid\n          })\n        );\n      })\n      .then(resolve)\n      .catch((err) => {\n        toast.error(err.message || 'Failed to save request!');\n        reject(err);\n      });\n  });\n};\n\nexport const saveFile = (content, itemUid, collectionUid, silent = false) => async (dispatch, getState) => {\n  const state = getState();\n  const collection = findCollectionByUid(state.collections.collections, collectionUid);\n  const tempDirectory = state.collections.tempDirectories?.[collectionUid];\n\n  if (!collection) {\n    throw new Error('Collection not found');\n  }\n\n  const collectionCopy = cloneDeep(collection);\n  const item = findItemInCollection(collectionCopy, itemUid);\n\n  // Item is not used to save the bru file\n  // This is to validate if the bru content is associated with a valid item\n  if (!item) {\n    throw new Error('Not able to locate item');\n  }\n\n  const isTransient = tempDirectory && item.pathname.startsWith(tempDirectory);\n  if (isTransient) {\n    if (!silent) {\n      dispatch(addSaveTransientRequestModal({ item, collection }));\n    }\n    throw new Error('Cannot save transient request');\n  }","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js#L198-L234","documentation":"Error \"Collection not found\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reload the workspace; the collection may have been removed from disk.","Verify the collection path still exists on the filesystem."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}