Skip to content

Releases: xdevplatform/autohook

v1.2.1

07 Aug 15:20
cb6a18c
Compare
Choose a tag to compare

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

07 Aug 14:49
7a06e81
Compare
Choose a tag to compare

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 a resetAt 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

02 Aug 20:30
7a06e81
Compare
Choose a tag to compare

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 error
    • TooManySubscriptionsError, 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

31 Jul 01:21
Compare
Choose a tag to compare

This is the first stable release of Autohook.