Skip to content

Commit

Permalink
add missing error handling when calling fwd factorie functions
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Sep 16, 2024
1 parent f908c10 commit ba8a037
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion port_forwarder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ func ParseConfig(
return fmt.Errorf("child yml node of \"port_forwarding.%s.%d.protocols\" doesn't support: %s", direction, fwd_idx, proto_str)
}

factoryFn(node_map)
err := factoryFn(node_map)
if err != nil {
return fmt.Errorf("child yml node of \"port_forwarding.%s.%d.protocols\" with proto %s - failed to instantiate forwarder: %v", direction, fwd_idx, proto_str, err)
}
}
}
}
Expand Down

0 comments on commit ba8a037

Please sign in to comment.