{"record":{"id":"a28395f3a40e260d","repo":"jackc/pgx","slug":"box-w","errorCode":null,"errorMessage":"Box: %w","messagePattern":"Box: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/box.go","lineNumber":161,"sourceCode":"\ntype scanPlanBinaryBoxToBoxScanner struct{}\n\nfunc (scanPlanBinaryBoxToBoxScanner) Scan(src []byte, dst any) error {\n\tscanner := (dst).(BoxScanner)\n\n\tif src == nil {\n\t\treturn scanner.ScanBox(Box{})\n\t}\n\n\tr := pgio.NewReader(src)\n\n\tx1 := r.Uint64()\n\ty1 := r.Uint64()\n\tx2 := r.Uint64()\n\ty2 := r.Uint64()\n\n\tif err := r.Finish(); err != nil {\n\t\treturn fmt.Errorf(\"Box: %w\", err)\n\t}\n\n\treturn scanner.ScanBox(Box{\n\t\tP: [2]Vec2{\n\t\t\t{math.Float64frombits(x1), math.Float64frombits(y1)},\n\t\t\t{math.Float64frombits(x2), math.Float64frombits(y2)},\n\t\t},\n\t\tValid: true,\n\t})\n}\n\ntype scanPlanTextAnyToBoxScanner struct{}\n\nfunc (scanPlanTextAnyToBoxScanner) Scan(src []byte, dst any) error {\n\tscanner := (dst).(BoxScanner)\n\n\tif src == nil {\n\t\treturn scanner.ScanBox(Box{})","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/box.go#L143-L179","documentation":"After reading the four float64 coordinates of a binary box, the reader still had bytes left (Finish failed): the message is longer than the 32 bytes a box requires, so the payload is malformed.","triggerScenarios":"Thrown at pgtype/box.go:161 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fail the scan; the binary box payload is corrupt","Check for truncation/corruption by proxies or custom encoders","Verify the column is actually of type box"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}