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 2d0f857 commit 5701090
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 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,12 @@ 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 5701090

Please sign in to comment.