Exception: ScrapeUnblocker::AuthenticationError

Inherits:
APIError
  • Object
show all
Defined in:
lib/scrapeunblocker/errors.rb

Overview

The API key was rejected (HTTP 401).

Two cases produce a 401: an unrecognised key ("Unauthorized" - a typo, trailing whitespace, an empty value, or a key rotated in the dashboard), and a valid key on an account with no plan, which raises the NoSubscriptionError subclass. Omitting the key header entirely is a 400, not a 401. Nothing is scraped for a 401, so it is not billed.

Direct Known Subclasses

NoSubscriptionError

Instance Attribute Summary

Attributes inherited from APIError

#body, #status_code

Method Summary

Methods inherited from APIError

#initialize

Constructor Details

This class inherits a constructor from ScrapeUnblocker::APIError