Skip to content

Commit

Permalink
Merge pull request #39 from ExpediaGroup/tipike/go_server_crash
Browse files Browse the repository at this point in the history
fix linting
  • Loading branch information
piket authored Sep 26, 2023
2 parents d2284ef + efe3128 commit 76d265e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions go/internal/feast/transformation/transformation.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,14 @@ func CallTransformations(
cdata.ExportArrowRecordBatch(inputRecord, &inputArr, &inputSchema)

// Recover from a panic from FFI so the server doesn't crash
var err error
ret := callback(featureView.Base.Name, inputArrPtr, inputSchemaPtr, outArrPtr, outSchemaPtr, fullFeatureNames)
defer func() {
if e := recover(); e != nil {
ret = nil
nil = e.(Error)
ret = -1
err = e.(error)
}
}()
ret := callback(featureView.Base.Name, inputArrPtr, inputSchemaPtr, outArrPtr, outSchemaPtr, fullFeatureNames)

if ret != numRows {
return nil, errors.New("python transformation callback failed")
Expand Down

0 comments on commit 76d265e

Please sign in to comment.