{"record":{"id":"00bb309cdbe4298a","repo":"shadow1ng/fscan","slug":"ora-05d-s","errorCode":null,"errorMessage":"ORA-%05d: %s","messagePattern":"ORA-%05d: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/oracle_raw.go","lineNumber":1829,"sourceCode":"\t\tmsg = fmt.Sprintf(\"ORA-%05d\", s.summary.retCode)\n\t}\n\treturn fmt.Errorf(\"%s\", msg)\n}\n\nfunc oracleRefuseError(raw []byte) error {\n\tif len(raw) < 12 {\n\t\treturn errors.New(\"oracle connection refused\")\n\t}\n\tdataLen := int(binary.BigEndian.Uint16(raw[10:12]))\n\tif len(raw) < 12+dataLen {\n\t\treturn errors.New(\"oracle connection refused\")\n\t}\n\tmsg := string(raw[12 : 12+dataLen])\n\tcode := oracleExtractCode(msg)\n\tif code == 0 {\n\t\treturn fmt.Errorf(\"oracle connection refused: %s\", msg)\n\t}\n\treturn fmt.Errorf(\"ORA-%05d: %s\", code, msg)\n}\n\nfunc oracleExtractCode(msg string) int {\n\tupper := strings.ToUpper(msg)\n\tfor _, marker := range []string{\"ERR=\", \"CODE=\"} {\n\t\tidx := strings.Index(upper, marker)\n\t\tif idx < 0 {\n\t\t\tcontinue\n\t\t}\n\t\tidx += len(marker)\n\t\tfor idx < len(upper) && (upper[idx] < '0' || upper[idx] > '9') {\n\t\t\tidx++\n\t\t}\n\t\tstart := idx\n\t\tfor idx < len(upper) && upper[idx] >= '0' && upper[idx] <= '9' {\n\t\t\tidx++\n\t\t}\n\t\tif start < idx {","sourceCodeStart":1811,"sourceCodeEnd":1847,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/oracle_raw.go#L1811-L1847","documentation":"Formatter in oracleRefuseError: the Oracle TNS refuse packet carried a message from which an ORA error code was extracted, so the failure is surfaced as the canonical Oracle error string 'ORA-nnnnn: message' for the refused connection (e.g. ORA-12514 listener does not know of service).","triggerScenarios":"Thrown at plugins/services/oracle_raw.go:1829 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Look up the specific ORA code: listener/service issues (ORA-12514), credentials (ORA-01017), or host blocking (ORA-12541)","Verify service name and port in the connect descriptor","Check that the listener is running and the service is registered"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}