Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services should never return transport level errors #2415

Conversation

butonic
Copy link
Contributor

@butonic butonic commented Jan 5, 2022

The CS3 API adopted the grpc error codes from the google grpc status package. 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.

@update-docs
Copy link

update-docs bot commented Jan 5, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@butonic butonic force-pushed the services-should-never-return-transport-level-errors branch 2 times, most recently from c412c70 to bbc97a5 Compare January 6, 2022 10:13
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic marked this pull request as ready for review January 6, 2022 13:55
@wkloucek wkloucek merged commit 65107bb into cs3org:edge Jan 6, 2022
@butonic butonic deleted the services-should-never-return-transport-level-errors branch January 6, 2022 14:19
@glpatcern
Copy link
Member

I would merge this to master as well! @ishank011 ?

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.

3 participants