{"id":"6ccb00aa23f2a980","repo":"jackc/pgx","slug":"cannot-scan-t-6ccb00","errorCode":null,"errorMessage":"cannot scan %T","messagePattern":"cannot scan %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/bool.go","lineNumber":63,"sourceCode":"\t\t*dst = Bool{Bool: src, Valid: true}\n\t\treturn nil\n\tcase string:\n\t\tb, err := strconv.ParseBool(src)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*dst = Bool{Bool: b, Valid: true}\n\t\treturn nil\n\tcase []byte:\n\t\tb, err := strconv.ParseBool(string(src))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*dst = Bool{Bool: b, Valid: true}\n\t\treturn nil\n\t}\n\n\treturn fmt.Errorf(\"cannot scan %T\", src)\n}\n\n// Value implements the [database/sql/driver.Valuer] interface.\nfunc (src Bool) Value() (driver.Value, error) {\n\tif !src.Valid {\n\t\treturn nil, nil\n\t}\n\n\treturn src.Bool, nil\n}\n\n// MarshalJSON implements the [encoding/json.Marshaler] interface.\nfunc (src Bool) MarshalJSON() ([]byte, error) {\n\tif !src.Valid {\n\t\treturn []byte(\"null\"), nil\n\t}\n\n\tif src.Bool {","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/bool.go#L45-L81","documentation":"Error \"cannot scan %T\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/bool.go:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}