Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty reply will break chatbot #285

Open
MrOrz opened this issue Sep 2, 2021 · 0 comments
Open

Empty reply will break chatbot #285

MrOrz opened this issue Sep 2, 2021 · 0 comments

Comments

@MrOrz
Copy link
Member

MrOrz commented Sep 2, 2021

View details in Rollbar: https://rollbar.com/mrorz/rumors-line-bot/items/364/

[LINE Client] 400: A message (messages[2]) in the request body is invalid.

messages[2]:

{"type":"flex","altText":"請從下列選擇您要查看的回應。","contents":{"type":"carousel","contents":[{"type":"bubble","direction":"ltr","header":{"type":"box","layout":"horizontal","spacing":"md","paddingBottom":"none","contents":[{"type":"text","text":"💬","flex":0},{"type":"text","text":"有人認為它含有不實訊息","gravity":"center","size":"sm","weight":"bold","wrap":true,"color":"#AAAAAA"}]},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"假的。 \n2019年起的相關規定如下:\n1、紅燈右轉: 機車和小型車罰 600元、大型車罰1400元。\n2、闖紅燈: 機車罰1800元、小型車罰2700元、大型車罰3600元。","align":"start","wrap":true,"margin":"md","maxLines":10},{"type":"filler"},{"type":"separator","margin":"md"},{"type":"box","layout":"horizontal","contents":[{"type":"text","text":"👍 有 1296 人覺得此回應有幫助\n😕 有 14 人覺得此回應沒幫助","size":"xs","wrap":true}],"margin":"md","spacing":"none"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"👀 看他怎麼說","displayText":"我要選「假的。 \n2019年起的相關規定如下:\n1、紅⋯⋯」","data":"{\"input\":\"CkyiZ24BV0DITCqGleU_\",\"sessionId\":1630504342376,\"state\":\"CHOOSING_REPLY\"}"},"style":"primary","color":"#ffb600"}]}},{"type":"bubble","direction":"ltr","header":{"type":"box","layout":"horizontal","spacing":"md","paddingBottom":"none","contents":[{"type":"text","text":"💬","flex":0},{"type":"text","text":"有人認為它不在查證範圍","gravity":"center","size":"sm","weight":"bold","wrap":true,"color":"#AAAAAA"}]},"body":{"type":"box","layout":"vertical","contents":[{"type":"text","text":"","align":"start","wrap":true,"margin":"md","maxLines":10},{"type":"filler"},{"type":"separator","margin":"md"},{"type":"box","layout":"horizontal","contents":[{"type":"text","text":"還沒有人針對此回應評價","size":"xs","wrap":true}],"margin":"md","spacing":"none"}]},"footer":{"type":"box","layout":"vertical","contents":[{"type":"button","action":{"type":"postback","label":"👀 看他怎麼說","displayText":"我要選「」","data":"{\"input\":\"UkJBtHoBgBgcuemX5aeB\",\"sessionId\":123,\"state\":\"CHOOSING_REPLY\"}"},"style":"primary","color":"#ffb600"}]}}]}}

The reply: https://cofacts.tw/reply/UkJBtHoBgBgcuemX5aeB

Occurrences:
image

@MrOrz MrOrz changed the title [LINE Client] 400: A message (messages[2]) in the request body is invalid. Empty reply will break chatbot Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant