nautobot / nautobot-app-chatops

Extensible ChatOps Framework to enable other chatbots and the Nautobot chat command.
https://docs.nautobot.com/projects/chatops/en/latest/
Other
50 stars 33 forks source link

Webex Teams: Error with too large an output #2

Closed matt852 closed 3 years ago

matt852 commented 3 years ago

Environment

Steps to Reproduce

  1. Have over 200 devices in one site in the Nautobot DB
  2. In Webex teams, run the "get-devices" command for that category
  3. For device filter, select "Site"
  4. Select the site with over 200 devices in it

Expected Behavior

For get-devices, I expected the bot to return all devices in the site.

Observed Behavior

Webex (not nautobot) returned an error, presumably because nautobot successfully generated the list of devices, but it was too large for Webex to handle. The error is:

An internal error occurred: [400] Bad Request - Unable to post message to room: Message length limited to 7439 characters before encryption and 10000 characters after encryption. [Tracking ID: ROUTER_604A552B-AD26-01BB-03BA-AC12FB2803BA]

The Tracking ID changes each time.

Also note this exact same error occurs for similar commands. For example, if you have too many circuits at one site, and run the "get-circuits" command, and filter by "All (no filter)"

jvanderaa commented 3 years ago

Good catch on the character length. There was something similar in the Slack dispatcher as well. So we can re-use that logic there.

matt852 commented 3 years ago

Please assign this to me