Skip to content

Commit

Permalink
Fix missing error handling (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Oct 12, 2023
1 parent 4c532f4 commit d40bd09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions do/serverless.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,9 @@ func (s *serverlessService) GetHostInfo(APIHost string) (ServerlessHostInfo, err
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return ServerlessHostInfo{}, err
}
var result ServerlessHostInfo
err = json.Unmarshal(body, &result)
return result, err
Expand Down
3 changes: 3 additions & 0 deletions internal/apps/builder/cnb.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ func (b *CNBComponentBuilder) buildStaticSiteImage(ctx context.Context) error {
return err
}
assetsPath, err = filepath.Rel(workspacePath, assetsPath)
if err != nil {
return err
}
if assetsPath == "." {
assetsPath = "./"
} else {
Expand Down

0 comments on commit d40bd09

Please sign in to comment.