Skip to content

Commit

Permalink
missing exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
grundprinzip committed Jul 23, 2024
1 parent 4405ef7 commit 9901327
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spark/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ func (s *SparkExecutorImpl) AnalyzePlan(ctx context.Context, plan *proto.Plan) (
ctx = metadata.NewOutgoingContext(ctx, s.metadata)

response, err := s.client.AnalyzePlan(ctx, &request)
if err != nil {
return nil, sparkerrors.WithType(fmt.Errorf("failed to call AnalyzePlan in session %s: %w", s.sessionId, err), sparkerrors.ExecutionError)
if se := sparkerrors.FromRPCError(err); se != nil {
return nil, sparkerrors.WithType(se, sparkerrors.ExecutionError)
}
return response, nil
}
Expand Down

0 comments on commit 9901327

Please sign in to comment.