tonybaloney / hubot-spark

A hubot integration for Cisco Spark
Apache License 2.0
14 stars 6 forks source link

Hubot dies with: The user has sent too many requests #20

Open ecmoody opened 5 years ago

ecmoody commented 5 years ago

When I start Hubot using a Bot access token, it dies after about 30 seconds with the below message. Is there a parameter that need to be passed to limit the rate?

[Tue Jul 30 2019 12:02:32 GMT-0400 (Eastern Daylight Time)] ERROR BadRequest: The user has sent too many requests in a given amount of time. Please refer to the Retry-After response header to wait before making a new request. undefined https://api.ciscospark.com/v1/messages WEBEX_TRACKINGID: spark-js-sdk**

at BadRequest.ExtendableBuiltin (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:50:44)
at BadRequest.Exception (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:99:142)
at BadRequest.HttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error.js:70:125)
at BadRequest.SparkHttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/spark-core/dist/lib/spark-http-error.js:48:135)
at new BadRequest (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error-subtypes.js:64:129)
at HttpStatusInterceptor.onResponse (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/interceptors/http-status.js:99:39)
at /opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/request/index.js:72:41
at process._tickCallback (internal/process/next_tick.js:68:7)

[Tue Jul 30 2019 12:02:32 GMT-0400 (Eastern Daylight Time)] ERROR BadRequest: The user has sent too many requests in a given amount of time. Please refer to the Retry-After response header to wait before making a new request. undefined https://api.ciscospark.com/v1/messages WEBEX_TRACKINGID: spark-js-sdk**

at BadRequest.ExtendableBuiltin (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:50:44)
at BadRequest.Exception (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:99:142)
at BadRequest.HttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error.js:70:125)
at BadRequest.SparkHttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/spark-core/dist/lib/spark-http-error.js:48:135)
at new BadRequest (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error-subtypes.js:64:129)
at HttpStatusInterceptor.onResponse (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/interceptors/http-status.js:99:39)
at /opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/request/index.js:72:41
at process._tickCallback (internal/process/next_tick.js:68:7)

[Tue Jul 30 2019 12:02:32 GMT-0400 (Eastern Daylight Time)] INFO Hubot will shut down