Releases: xdevplatform/autohook
Releases · xdevplatform/autohook
v1.2.1
This releases correct a "TypeError: response is not defined" error while removing a webhook. It also adds more details to the error messages that may appear while removing a webhook.
v1.2.0
This release improves how Autohook handles errors, and provides better messaging around rate limits.
What's new this version
- Add a new
RateLimitError
, which throws on HTTP 429 and describes how many requests were allotted and when the rate limit window will reset. This error type also exposes aresetAt
property, containing a UNIX timestamp (in milliseconds) indicating the time when the rate limit is reset (new Date().getTime() - RateLimitError.resetAt
gives the number of seconds the user needs to wait before being able to make another request). - Refactor the error handling logic to consistently throw on non-2xx status codes, and to acknowledge more HTTP status codes than before.
- Refactor
TwitterError
so it can now include the HTTP status code together with the Twitter error code.
v1.1.0
This change brings general improvements to URL validation and error messages.
What's new this version
- Added new error types:
WebhookURIError
, thrown when the Account Activity API detects an invalid URL.UserSubscriptionError
, thrown then the Account Activity API returns an errorTooManySubscriptionsError
, thrown when the number of subscribed users exceed the number of subscriptions available in your premium account.
- We moved those new error definitions to a separate module, and we removed unused code.
- Fixed a bug for which a developer could provide an empty configuration object to Autohook by passing an empty object to its constructor.
- Autohook now validates your configuration on instantiation, and will fail if one of the required values is not set or it is empty.
- Autohook now removes leading/trailing whitespaces from your configuration variables.
Autohook.start()
now validates a webhook URL, if provided. Autohook will fail if the URL is not HTTPS, or if you provide a relative URL instead of an absolute URL.
v1.0.7
This is the first stable release of Autohook.