Skip to content

Commit

Permalink
fix the panic if pfop failed
Browse files Browse the repository at this point in the history
  • Loading branch information
bachue committed Oct 31, 2024
1 parent 5a3aa97 commit 1d0135a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iqshell/storage/object/fop.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ func Pfop(info PfopApiInfo) (string, *data.CodeError) {
WorkflowTemplateID: info.WorkflowTemplateID,
}
pfopRet, e := opManager.PfopV2(context.Background(), &pfopRequest)
return pfopRet.PersistentID, data.ConvertError(e)
if e != nil {
return "", data.ConvertError(e)
}
return pfopRet.PersistentID, nil
}

func getOperationManager(bucket string) (*storage.OperationManager, *data.CodeError) {
Expand Down

0 comments on commit 1d0135a

Please sign in to comment.