Skip to content

[public-api] Convert server errors to appropriate RPC errors #9829

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

Merged
merged 1 commit into from
May 13, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented May 6, 2022

Description

Server errors are returned largely as string errors into the library we're using. We need to parse them somewhat to know what to return to the caller.

In this PR, we first extract info from the server errors and wrap them with a corresponding gRPC status code, we then take this on the GetWorkspace handler to return meaningful user facing errors out, without the underlying protocol errors. In effect, we have internal and public errors, and the internal details shouldn't be returned the caller.

Related Issue(s)

How to test

Unit tests

Release Notes

NONE

Documentation

NONE

@easyCZ easyCZ requested a review from a team May 6, 2022 13:35
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label May 6, 2022
@easyCZ easyCZ force-pushed the mp/pub-api-convert-server-errs branch 2 times, most recently from 2830a0c to 173713d Compare May 9, 2022 12:45
@roboquat roboquat added size/L and removed size/M labels May 9, 2022
@easyCZ easyCZ force-pushed the mp/pub-api-convert-server-errs branch from 173713d to 3ab28e8 Compare May 12, 2022 08:56
@roboquat roboquat merged commit 5361bab into main May 13, 2022
@roboquat roboquat deleted the mp/pub-api-convert-server-errs branch May 13, 2022 07:38
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants