Skip to content

Commit 49a0c2a

Browse files
committed
Add "invalid_header_parameter" error
1 parent db533e2 commit 49a0c2a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "screenshotone-errors",
33
"homepage": "https://screenshotone.com",
4-
"version": "1.0.19",
4+
"version": "1.0.20",
55
"description": "Errors produced by the ScreenshotOne API.",
66
"repository": {
77
"type": "git",

src/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export enum ErrorCode {
2222
TemporaryUnavailable = "temporary_unavailable",
2323
ResultingImageTooLarge = "resulting_image_too_large",
2424
InvalidCookieParameter = "invalid_cookie_parameter",
25+
InvalidHeaderParameter = "invalid_header_parameter",
2526
MatchedFailedRequest = "matched_failed_request",
2627
}
2728

@@ -52,6 +53,15 @@ const allErrors: Record<ErrorCode, APIError> = {
5253
documentationUrl:
5354
"https://screenshotone.com/docs/errors/invalid-cookie-parameter/",
5455
},
56+
[ErrorCode.InvalidHeaderParameter]: {
57+
httpStatusCode: 400,
58+
title: "Invalid Header Parameter",
59+
code: "invalid_header_parameter",
60+
description:
61+
"The `headers` parameters you provided are invalid. Please, consider providing different values and adhere to the format specified in the ScreenshotOne documentation.",
62+
documentationUrl:
63+
"https://screenshotone.com/docs/errors/invalid-header-parameter/",
64+
},
5565
[ErrorCode.SelectorNotFound]: {
5666
httpStatusCode: 400,
5767
title: "Selector Not Found",

0 commit comments

Comments
 (0)