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

Error: Maximum length of the field is 4096. Field: apps.dynamite.CreateMessageInfo.text_body #12

Open
jonathan-w-smith opened this issue Aug 17, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@jonathan-w-smith
Copy link

When users request help from the chatbot the Hangouts Chat API is erroring due to the length of the message being sent.

(node:74910) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:74910) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:74910) UnhandledPromiseRejectionWarning: Error: Maximum length of the field is 4096. Field: apps.dynamite.CreateMessageInfo.text_body
  at createError (/hubot/node_modules/axios/lib/core/createError.js:16:15)
  at settle (/hubot/node_modules/axios/lib/core/settle.js:18:12)
  at Unzip.handleStreamEnd (/hubot/node_modules/axios/lib/adapters/http.js:202:11)
  at Unzip.emit (events.js:208:15)
  at Unzip.EventEmitter.emit (domain.js:476:20)
  at endReadableNT (_stream_readable.js:1168:12)
  at processTicksAndRejections (internal/process/task_queues.js:77:11)

Depending on the content that may need to be sent the limitation of the Hangouts Chat API and how the adapter interacts with it could present a problem with sending appropriate responses.

@rtilikay
Copy link

Hi Jonathan,

Unfortunately, the maximum length is set by Hangouts Chat and cannot be changed. Is it possible for you to shorten your documentation to fit under 4KB?

Alternatively, we could add an option to use paging for long messages, i.e. break text messages longer than 4KB into 4KB chunks and send them as multiple messages. Hangouts Chat already groups messages sent closer together, so the experience should be near-equivalent to sending a single, long message. Would that idea fit your use case?

@jonathan-w-smith
Copy link
Author

I think implementing a paging system is the best solution. I used help content as an example, but I can see many cases where it would be possible to end up with more content than the 4KB. My team runs into this limit on an almost daily basis just using Hangouts Chat in everyday use.

@rtilikay
Copy link

Sounds good, I'll look into introducing this functionality.

@rtilikay rtilikay reopened this Aug 20, 2019
@asrivas asrivas added the enhancement New feature or request label Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants