Skip to content

Commit 6e5e014

Browse files
authored
add err handling, avoid panic (#374)
1 parent ab9cb9f commit 6e5e014

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rpc/transform.go

+3
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ func toCoreBuildOptions(b *pb.BuildImageOptions) (*types.BuildOptions, error) {
213213

214214
func toCoreReplaceOptions(r *pb.ReplaceOptions) (*types.ReplaceOptions, error) {
215215
deployOpts, err := toCoreDeployOptions(r.DeployOpt)
216+
if err != nil {
217+
return nil, err
218+
}
216219

217220
replaceOpts := &types.ReplaceOptions{
218221
DeployOptions: *deployOpts,

0 commit comments

Comments
 (0)