SIGN IN SIGN UP

pldmd: fix unsupported command handling

A request with a valid PLDM type but an unregistered command
currently results in std::out_of_range from the command handler
lookup.

Unsupported commands are protocol-level errors and should return
a PLDM completion code instead of propagating a C++ exception.

Replace the throwing command lookup with a guarded lookup and
return PLDM_ERROR_UNSUPPORTED_PLDM_CMD when a command is not
registered.

Update the registration test to verify that unsupported commands
return the expected completion code rather than throwing an
exception.

Tested:
- meson test -C build pldmd_registration_test --print-errorlogs

Change-Id: Ia85d86fd4d22f7510e8ee52876f31643470eee70
Signed-off-by: Meghana Vangapandu <meghanav@ami.com>
M
Meghana Vangapandu committed
283e1ddd2721e92a86a87282334c0dc080c46872
Parent: cc8d016
Committed by ManojKiran Eda <manojkiran.eda@gmail.com> on 8/17/2026, 10:01:40 AM