{"id":"a499e26005ae1c19","repo":"jackc/pgx","slug":"cannot-scan-null-into-16-byte","errorCode":null,"errorMessage":"cannot scan NULL into *[16]byte","messagePattern":"cannot scan NULL into \\*\\[16\\]byte","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/builtin_wrappers.go","lineNumber":659,"sourceCode":"\t\ts := v\n\t\thstore[k] = &s\n\t}\n\treturn hstore, nil\n}\n\ntype fmtStringerWrapper struct {\n\ts fmt.Stringer\n}\n\nfunc (w fmtStringerWrapper) TextValue() (Text, error) {\n\treturn Text{String: w.s.String(), Valid: true}, nil\n}\n\ntype byte16Wrapper [16]byte\n\nfunc (w *byte16Wrapper) ScanUUID(v UUID) error {\n\tif !v.Valid {\n\t\treturn fmt.Errorf(\"cannot scan NULL into *[16]byte\")\n\t}\n\t*w = byte16Wrapper(v.Bytes)\n\treturn nil\n}\n\nfunc (w byte16Wrapper) UUIDValue() (UUID, error) {\n\treturn UUID{Bytes: [16]byte(w), Valid: true}, nil\n}\n\ntype byteSliceWrapper []byte\n\nfunc (w byteSliceWrapper) SkipUnderlyingTypePlan() {}\n\nfunc (w *byteSliceWrapper) ScanText(v Text) error {\n\tif !v.Valid {\n\t\t*w = nil\n\t\treturn nil\n\t}","sourceCodeStart":641,"sourceCodeEnd":677,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/builtin_wrappers.go#L641-L677","documentation":"Error \"cannot scan NULL into *[16]byte\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/builtin_wrappers.go:659 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}