diff --git a/runtime/vam/expr/putter.go b/runtime/vam/expr/putter.go index 918fd6a10a..3330fcd4b4 100644 --- a/runtime/vam/expr/putter.go +++ b/runtime/vam/expr/putter.go @@ -23,7 +23,10 @@ func (p *Putter) Eval(vec vector.Any) vector.Any { func (p *Putter) eval(vecs ...vector.Any) vector.Any { vec := vecs[0] - if vec.Type().Kind() != super.RecordKind { + if k := vec.Type().Kind(); k != super.RecordKind { + if k == super.ErrorKind { + return vec + } return vector.NewWrappedError(p.zctx, "put: not a record", vec) } return p.recordExpr.Eval(vec) diff --git a/runtime/ztests/op/put-non-record.yaml b/runtime/ztests/op/put-non-record.yaml index f205713ce4..dc86e53a52 100644 --- a/runtime/ztests/op/put-non-record.yaml +++ b/runtime/ztests/op/put-non-record.yaml @@ -4,6 +4,8 @@ vector: true input: | 0 + error("kaboom") output: | error({message:"put: not a record",on:0}) + error("kaboom")