[Node] Storing canvas in session causes error
Hi,
in one of our use cases some data can be retrieved from a server which can have a base64 encoding of a canvas in it. I am not exactly sure if it's stored in the userData, but somewhere down the line an error is thrown.
Error: Request to 'https://state.botframework.com/v3/botstate/slack/users/<userID>' failed: [400] Bad Request
at Request._callback (/bot/node_modules/botbuilder/lib/bots/ChatConnector.js:414:46)
at Request.self.callback (/bot/node_modules/request/request.js:187:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/bot/node_modules/request/request.js:1044:10)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/bot/node_modules/request/request.js:965:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
How much data are you trying to store?
https://docs.botframework.com/en-us/technical-faq/#is-there-a-limit-on-the-amount-of-data-i-can-store-using-the-state-api
I'm not sure how much it is, but the canvas results in a lot of data so that could be it.
Hi @hgjkant , was that the issue? was this solved? thanks!
I haven't been able to test this yet, I'll be able to tomorrow.
I tried this again, and a canvas works. There were more than one in when the original error occurred, so I am assuming the session became too big to store. On a side note: when the bot tries to send a message to the user that is too big, it gives an error to explain that, it would be nice it that would be possible for the session too.
Yes - I agree, better diagnostics would be nice. I'll add this to our internal backlog.