{"record":{"id":"a6437c425d1fdd78","repo":"diegosouzapw/OmniRoute","slug":"internal-002","errorCode":"INTERNAL_002","errorMessage":"Database error","messagePattern":"Database error","errorType":"error_code","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/shared/constants/errorCodes.ts","lineNumber":205,"sourceCode":"    httpStatus: 404,\n    category: \"COMBO\",\n  },\n  COMBO_008: {\n    code: \"COMBO_008\",\n    message: \"Combo target violates its provider or model family invariant\",\n    httpStatus: 400,\n    category: \"COMBO\",\n  },\n\n  // ── Internal ──\n  INTERNAL_001: {\n    code: \"INTERNAL_001\",\n    message: \"Internal server error\",\n    httpStatus: 500,\n    category: \"INTERNAL\",\n  },\n  INTERNAL_002: {\n    code: \"INTERNAL_002\",\n    message: \"Database error\",\n    httpStatus: 500,\n    category: \"INTERNAL\",\n  },\n  INTERNAL_003: {\n    code: \"INTERNAL_003\",\n    message: \"Circuit breaker open\",\n    httpStatus: 503,\n    category: \"INTERNAL\",\n  },\n};\n\nexport function createErrorResponse(code: string, details: ErrorDetails = {}) {\n  const def = ERROR_CODES[code];\n  if (!def) {\n    return {\n      error: {\n        code: \"INTERNAL_001\",","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/shared/constants/errorCodes.ts#L187-L223","documentation":"Error \"Database error\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/shared/constants/errorCodes.ts:205 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}