smartdevicelink / sdl_core

SmartDeviceLink In-Vehicle Software and Sample HMI
BSD 3-Clause "New" or "Revised" License
240 stars 245 forks source link

SDL does not forward an error message to the app during processing CreateInteractionChoiceSet RPC #3859

Open GetmanetsIrina opened 2 years ago

GetmanetsIrina commented 2 years ago

Bug Report

SDL does not forward an error message to the app during processing CreateInteractionChoiceSet RPC

Reproduction Steps
  1. SDL and HMI are started
  2. App is registered
  3. On HMI go to "Setting -> RPC Control -> SyncProxyTester -> CreateInteractionChoiceSet"
  4. Set response resultCode to REJECTED and click "Save" button
  5. App sends RPC CreateInteractionChoiceSet request with vrCommands
  6. HMI responds with error code "REJECTED" and error message
Expected Behavior

SDL sends CreateInteractionChoiceSet(resultCode = "REJECTED", info = <message received from HMI>) response to the mobile app

Observed Behavior

SDL sends CreateInteractionChoiceSet response without info message to the mobile app

MOB->SDL [15-02-2022 12:53:39,993] [rpcFunction: CreateInteractionChoiceSet, sessionId: 1, version: 2, frameType: 1, encryption: false, serviceType: 7, frameInfo: 0, messageId: 5, binaryDataSize: 0] : {"interactionChoiceSetID":1001,"choiceSet":[{"image":{"imageType":"DYNAMIC","value":"icon.png"},"menuName":"Choice1001","vrCommands":["Choice1001"],"choiceID":1001}]} 

SDL->HMI [15-02-2022 12:53:39,996] {"id":28,"jsonrpc":"2.0","method":"VR.AddCommand","params":{"appID":1962457943,"cmdID":1001,"grammarID":1448575975,"type":"Choice","vrCommands":["Choice1001"]}}

HMI->SDL [15-02-2022 12:53:39,996] {"jsonrpc":"2.0","error":{"data":{"method":"VR.AddCommand"},"code":4,"message":"Error message"},"id":28}

SDL->MOB [15-02-2022 12:53:40,004] [rpcFunction: CreateInteractionChoiceSet, sessionId: 1, version: 2, frameType: 1, encryption: false, serviceType: 7, frameInfo: 0, messageId: 8, binaryDataSize: 0] : {"success":false,"resultCode":"REJECTED"} 
OS & Version Information
Logs

SmartDeviceLinkCore.zip

GetmanetsIrina commented 2 years ago

Please notice this is a non-regression issue. It's also reproduced on 8.0