{"record":{"id":"19b64a6fc76b533d","repo":"Dokploy/dokploy","slug":"not-found-19b64a","errorCode":"NOT_FOUND","errorMessage":"Mariadb not found","messagePattern":"Mariadb not found","errorType":"exception","errorClass":"TRPCError","httpStatus":404,"severity":"error","filePath":"packages/server/src/services/mariadb.ts","lineNumber":84,"sourceCode":"\t\t\t\t},\n\t\t\t},\n\t\t\tmounts: true,\n\t\t\tserver: true,\n\t\t\tbackups: {\n\t\t\t\twith: {\n\t\t\t\t\tdestination: {\n\t\t\t\t\t\tcolumns: {\n\t\t\t\t\t\t\taccessKey: false,\n\t\t\t\t\t\t\tsecretAccessKey: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tdeployments: true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t});\n\tif (!result) {\n\t\tthrow new TRPCError({\n\t\t\tcode: \"NOT_FOUND\",\n\t\t\tmessage: \"Mariadb not found\",\n\t\t});\n\t}\n\treturn result;\n};\n\nexport const updateMariadbById = async (\n\tmariadbId: string,\n\tmariadbData: Partial<Mariadb>,\n) => {\n\tconst { appName, ...rest } = mariadbData;\n\tconst result = await db\n\t\t.update(mariadb)\n\t\t.set({\n\t\t\t...rest,\n\t\t})\n\t\t.where(eq(mariadb.mariadbId, mariadbId))","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/packages/server/src/services/mariadb.ts#L66-L102","documentation":"Thrown by findMariadbById when the MariaDB lookup including nested deployments returns null — the mariadbId has no matching row.","triggerScenarios":"Calling any mariadb router procedure that resolves by ID (findMariadbById backs the mariadb procedure) with a nonexistent or stale mariadbId.","commonSituations":"Database was deleted but the client/UI still references it, wrong server environment, or a copy-pasted ID from another project.","solutions":["Verify the ID exists in the mariadb table","Refetch the databases list and use a current ID","Confirm the target Dokploy server/environment"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const dbs = await trpc.mariadb.list.query();\nif (!dbs.some(d => d.mariadbId === id)) throw new Error('Unknown mariadbId');","typeGuard":null,"tryCatchPattern":"try { await findMariadbById(id); } catch (e) { if (e.code === 'NOT_FOUND') return null; throw e; }","preventionTips":["Refetch database lists after deletions","Pin API base URLs per environment"],"tags":["database","not-found","mariadb","lookup"],"backgroundTag":"resource-not-found-by-id","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}