Skip to content

return an error, when there is an error#251

Open
drewwells wants to merge 2 commits intomasterfrom
feature/returnErrors
Open

return an error, when there is an error#251
drewwells wants to merge 2 commits intomasterfrom
feature/returnErrors

Conversation

@drewwells
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented May 6, 2020

Codecov Report

Merging #251 (13245cc) into master (bb40c54) will decrease coverage by 0.83%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #251      +/-   ##
==========================================
- Coverage   74.42%   73.59%   -0.84%     
==========================================
  Files         164      164              
  Lines       15588    14389    -1199     
==========================================
- Hits        11601    10589    -1012     
+ Misses       3177     2933     -244     
- Partials      810      867      +57     
Impacted Files Coverage Δ
pdp/logical.go 43.18% <0.00%> (-12.38%) ⬇️
pdp/expr_float_divide.go 60.00% <0.00%> (-7.75%) ⬇️
pdp/expr_float_multiply.go 65.21% <0.00%> (-7.20%) ⬇️
pdp/expr_float_add.go 50.00% <0.00%> (-7.15%) ⬇️
pdp/expr_float_equal.go 70.00% <0.00%> (-6.93%) ⬇️
pdp/expr_integer_divide.go 70.00% <0.00%> (-6.93%) ⬇️
pdp/expr_float_greater.go 55.00% <0.00%> (-6.54%) ⬇️
pdp/expr_float_subtract.go 52.17% <0.00%> (-6.45%) ⬇️
pdp/ast/yast/value.go 57.38% <0.00%> (-6.03%) ⬇️
pdp/marshal.go 50.00% <0.00%> (-5.56%) ⬇️
... and 154 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb40c54...13245cc. Read the comment docs.

@drewwells
Copy link
Contributor Author

Needs to annotate some common errors with grpc Status codes


b := s.pool.Get()
msg.Body = s.rawValidateToBuffer(p, c, in.Body, b)
body, err := s.rawValidateToBuffer(p, c, in.Body, b)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you define new err variable, which shadows existing one. Can you make sure that this doesn't break existing logic, e.g. validatePostHook logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

})})
} else {
err = stream.Send(&pb.Msg{Body: s.rawValidateToBuffer(p, c, in.Body, buffer)})
body, err := s.rawValidateToBuffer(p, c, in.Body, buffer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you define new err variable, which shadows existing one. Can you make sure that this doesn't break existing logic, e.g. now external err is not updated with the error coming from Send. Consider renaming the new error variable to avoid ambiguity.

@drewwells drewwells requested a review from rdrozhdzh December 14, 2020 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants