Skip to content

Commit

Permalink
services should never return transport level errors (#2415)
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic authored Jan 6, 2022
1 parent bdd7ce3 commit 65107bb
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 65107bb

Please sign in to comment.