Skip to content

Commit

Permalink
services should never return transport level errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Jan 6, 2022
1 parent 071c3f6 commit bbc97a5
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 181 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: services should never return transport level errors

The CS3 API adopted the grpc error codes from the [google grpc status package](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto). It also separates transport level errors from application level errors on purpose. This allows sending CS3 messages over protocols other than GRPC. To keep that seperation, the server side must always return `nil`, even though the code generation for go produces function signatures for rpcs with an `error` return property. That allows clients to clearly distinguish between transport level errors indicated by `err != nil` the error and application level errors by checking the status code.

https://github.com/cs3org/reva/pull/2415
Loading

0 comments on commit bbc97a5

Please sign in to comment.