Debug Screenshot Errors

Activate error mode in Add Screenshots to surface validation and processing issues before they ripple through your automation. The feature enforces guardrails on every capture so you can trust screenshots routed to AWS S3, Azure, Google Cloud, or Cloudflare R2.

Keep error mode handy when launching new request templates, running scheduled captures, or validating element interactions. You'll receive descriptive feedback while maintaining the service's no-throttling guarantee across 20+ regions.

Test Error Mode Free or Compare Plans

  • Catch misconfigurations early: Flag out-of-range parameters like viewport sizes or quality values.
  • Validate on-page automation: Confirm selectors for hide, hover, and focus actions before bulk runs.
  • Improve monitoring reliability: Fail fast when critical UI components disappear so teams investigate immediately.

Why Enable Error Mode?

The Website Screenshot API is intentionally tolerant by default, succeeding whenever possible. Enabling &error=true asks the service to interrupt when the request or the page doesn’t match your criteria.

Two primary error categories can appear: validation errors (bad input) and processing errors (unexpected runtime conditions). Error mode is recommended when debugging screenshots to understand how they are generated and ensure every automation meets configuration expectations.

How to enable error mode

There are several ways to enable error mode.

Request Builder

Check the Error option under the Advanced tab.

GET Request

The example below shows a screenshot of a website with error mode enabled:

// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=
YOUR_API_KEY
&error=true
&url=https://example.com

POST Request

The example below shows a screenshot of a website with error mode enabled:

POST https://api.addscreenshots.com/screenshots?apikey=YOUR_API_KEY

{
  "url": "https://example.com",
  "error": true
}

Validation Errors (400 Bad Request)

A validation error denotes that the request is invalid due to an input or configuration error.

Example 1: Value Range

The image quality range is between 1 (lowest quality) to 100 (highest quality). If the request has a value outside of the expected range such as 110, the Screenshot API will adjust the quality to 100 automatically or raise an error when error mode is turned on.

Example 2: Viewport Size

The viewport area (screen size) also has a range depending on the subscription's plan. If the request specifies a value outside of the range such as 100000x100000 pixels, a default range such as 1920x1080 (HD 1080p) will be used or an error will be raised when error mode is turned on.

Why did the screenshot size not match the specified viewport size?
Enabling error mode will provide insight such as why a request with a viewport that is out of range such as 100000x100000 did not end up producing a 100000x100000 sized screenshot.

Example 3: Contradictory Settings

The full page screenshot setting denotes that screenshot of the entire webpage should be taken.

The section setting denotes that a screenshot of a specific section of the website should be taken.

Why was a full page screenshot created instead of a specific section?
With error mode disabled, a full page screenshot will be capture. With error mode enabled, an error will be raised stating that it isn't possible to take a full page screenshot and a screenshot of a section (partial webpage) at the same time.

Processing Errors (424 Failed Dependency)

A processing error denotes that an issue was detected with a dependency such as a missing element on the page.

Example 1: Missing Element

Let's say that the request would like to interact with the page such as hovering over an area, clicking on a menu item or a button, typing text into a textbox, scrolling to a specific section and more. By default, with error mode disabled, if the element such as a button to click on doesn't exit, the Screenshot API will still take a screenshot but the output may not have the desired outcome.

Enabling error mode will fail the request by raising an error when an element is missing. This can be desirable to ensure that screenshots meet the request criteria or fail if it doesn't.

Health Check Use Case

Let's say we have a mortgage interest rates webpage that we'd like to monitor daily using scheduled website screenshots by saving the screenshots to a cloud storage account.

In this sample use case, a healthy website can be determined if the page loaded successfully and an "interest rates" section appears on the website.

Enabling error mode will fail if the "interest rates" section doesn't exist, prompting investigation instead of assuming that the screenshots are valid every day even when the webpage content is in an unhealthy state.

Ship Confident Screenshot Workflows

Pair error mode with usage logs, webhooks, and scheduled captures to gain end-to-end visibility. Validate configurations once, then scale without surprises.

Enable Error Mode on Your Next Capture