{"record":{"id":"cdc8d3d82423fb5e","repo":"Kong/insomnia","slug":"invalid-credential-data-structure","errorCode":null,"errorMessage":"Invalid credential data structure","messagePattern":"Invalid credential data structure","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/routes/git-credentials.$id.update.tsx","lineNumber":20,"sourceCode":"import { models, services } from 'insomnia-data';\nimport { href } from 'react-router';\n\nimport { createFetcherSubmitHook } from '~/ui/utils/router';\n\nimport type { Route } from './+types/git-credentials.$id.update';\n\nconst { isGitCredentialsV2 } = models.gitCredentials;\n\nexport async function clientAction({ request, params }: Route.ClientActionArgs) {\n  const data = (await request.json()) as Partial<GitCredentialsV2>;\n  const { id } = params;\n\n  const credential = await services.gitCredentials.getById(id);\n  if (!credential) {\n    throw new Error('Credential not found');\n  }\n  if (!isGitCredentialsV2(credential)) {\n    throw new Error('Invalid credential data structure');\n  }\n\n  await services.gitCredentials.update(credential, data);\n\n  return {\n    success: true,\n  };\n}\n\nexport const useGitCredentialsUpdateActionFetcher = createFetcherSubmitHook(\n  submit => (id: string, data: Partial<GitCredentialsV2>) => {\n    return submit(JSON.stringify(data), {\n      method: 'POST',\n      action: href('/git-credentials/:id/update', { id }),\n      encType: 'application/json',\n    });\n  },\n  clientAction,","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/routes/git-credentials.$id.update.tsx#L2-L38","documentation":"Error \"Invalid credential data structure\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/routes/git-credentials.$id.update.tsx:20 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}