#14188 GrpcInterface: Propagate parameter validation errors in command service#14195
Merged
Conversation
…d service Make RiaGrpcCommandService::assignPdmObjectValues return std::expected<void, QString> so the result of copyPdmObjectFromRipsToCaf is no longer discarded. Validation failures are now propagated up and returned to the client as a gRPC INVALID_ARGUMENT status instead of being silently ignored. This also resolves the C4834 [[nodiscard]] build warning.
…lPdmObjectMethod The return value of copyPdmObjectFromRipsToCaf was discarded when copying method parameters in CallPdmObjectMethod. Check the std::expected result and return a gRPC INVALID_ARGUMENT status (with telemetry and logging) when parameter validation fails, instead of silently proceeding to execute the method.
magnesj
force-pushed
the
fix/14188-grpc-command-nodiscard
branch
from
June 9, 2026 12:46
bb57cde to
0440a08
Compare
kriben
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14188.
copyPdmObjectFromRipsToCafreturnsstd::expected<void, QString>(implicitly[[nodiscard]]), but its result was discarded inRiaGrpcCommandService::assignPdmObjectValues, producing build warning C4834.Instead of silencing the warning, this propagates the error:
assignPdmObjectValuesnow returnsstd::expected<void, QString>.copyPdmObjectFromRipsToCafresult is returned directly, and the recursive call forwards failures.Executechecks the result and returns a gRPCINVALID_ARGUMENTstatus (with telemetry) on failure, mirroring the existing pattern inRiaGrpcPdmObjectService.As a result, parameter-validation errors are now surfaced to the Python client instead of being silently ignored, and the C4834 warning is resolved.