forked from wrenn/wrenn
fix: stop overwriting agent gRPC errors with CodeInternal
Removed the `connect.NewError(connect.CodeInternal, ...)` wrapper in the Server's MakeDir proxy handler. Previously, this wrapper was catching specific agent errors (like CodeAlreadyExists) and casting them into generic Code 13 (Internal) errors, stripping the gRPC metadata. This change allows the control-plane to act as a transparent pipeline, ensuring the API gateway can properly interpret and route specific filesystem failures.
This commit is contained in:
@ -290,7 +290,7 @@ func (s *Server) MakeDir(
|
|||||||
|
|
||||||
resp, err := client.MakeDir(ctx, msg.Path)
|
resp, err := client.MakeDir(ctx, msg.Path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("make dir: %w", err))
|
return nil, fmt.Errorf("make dir: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return connect.NewResponse(&pb.MakeDirResponse{
|
return connect.NewResponse(&pb.MakeDirResponse{
|
||||||
|
|||||||
Reference in New Issue
Block a user