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

return grpc error with correct format #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vanient
Copy link
Member

@Vanient Vanient commented Jun 26, 2023

fix #2

Copy link
Member

@flyflypeng flyflypeng left a comment

Choose a reason for hiding this comment

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

Please provide more backgroud info in the commit info, like:
[module-name]: <short summary of commit info>
reason: <more detailed info about this commit>

Copy link
Member

@flyflypeng flyflypeng left a comment

Choose a reason for hiding this comment

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

we need to make sure all errors in the grpc service function needed to be wrapped with tonic::Status

tonic::Code::Internal,
format!("failed to get sandbox {}, {}", req.sandbox_id, e),
)
})?;
let sandbox = sandbox_mutex.lock().await;
sandbox.exit_signal().await?
Copy link
Member

Choose a reason for hiding this comment

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

Why this error doesn't need to do map_err processing?

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.

return grpc error with correct format
2 participants