Skip to content

Commit

Permalink
Return InvalidCommand instead of UnsupportedCluster if the command is…
Browse files Browse the repository at this point in the history
… not handled in CHI
  • Loading branch information
yufengwangca committed Jan 23, 2025
1 parent 47a95b9 commit 5c36f8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/data-model-providers/codegen/CodegenDataModelProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,13 @@ std::optional<DataModel::ActionReturnStatus> CodegenDataModelProvider::Invoke(co
{
return std::nullopt;
}
else
{
// If we reach here, it means this particular CommandHandlerInterface recognized the cluster but the command is invalid
// or cannot be processed.
handler->AddStatus(request.path, Protocols::InteractionModel::Status::InvalidCommand);
return std::nullopt;
}
}

// Ember always sets the return in the handler
Expand Down

0 comments on commit 5c36f8c

Please sign in to comment.