Skip to content

Commit

Permalink
fix: invalid error handling (#2610)
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Ma <[email protected]>
  • Loading branch information
jim3ma authored Aug 8, 2023
1 parent bd140f1 commit 9cc9fa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions manager/service/preheat.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (s *service) GetV1Preheat(ctx context.Context, rawID string) (*types.GetV1P
id, err := strconv.ParseUint(rawID, 10, 32)
if err != nil {
logger.Errorf("preheat convert error", err)
return nil, status.Error(codes.Unknown, err.Error())
}

job := models.Job{}
Expand Down
1 change: 1 addition & 0 deletions pkg/source/transport_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func UpdateTransportOption(transport *http.Transport, optionYaml []byte) error {
proxy, err := url.Parse(opt.Proxy)
if err != nil {
fmt.Printf("proxy parse error: %s\n", err)
return err
}
transport.Proxy = http.ProxyURL(proxy)
}
Expand Down

0 comments on commit 9cc9fa2

Please sign in to comment.