Closed johnmiroki closed 1 year ago
@johnmiroki, thank you for your patience while I look into this. I will be attempting a repro and will let you know what I find.
@johnmiroki, your assessment seems to be on point. We are deciding what the next steps should be and will respond once that has been decided.
@stevkan Thank you for your confirmation!
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
What package version of the SDK are you using. 4.14.2 Spring Boot 2.7.1
Describe the bug
Give a clear and concise description of what the bug is. When a button with "Action.Execute" is clicked, the request sends to Bot SDK. When SDK is reading the "value" from activity, it asumes it's a JsonNode, but in fact, it's LinkedHashMap, hence it sends error to Teams
see
node = (JsonNode) obj;
starting line 705 of ActivityHandlerTo Reproduce
Steps to reproduce the behavior:
{"errorCode":1008,"message":"<BotError>Bot returned unsuccessful status code BadRequest"}
Expected behavior
Backend processes activity.getValue() as LinkedHashMap or whatever it could be (depending on the code deserializing activity json)
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
If I somehow convert activity.value into JsonNode, everything works. Two ways:
activity.setValue(new ObjectMapper().convert(activity.getValue(), JsonNode.class))
Write a class replacing the default BotController, where specifies Jackson to treat value as JsonNode