Skip to content

Commit db533e2

Browse files
committed
Add the "matched failed request" error
1 parent d36e5a9 commit db533e2

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.18",
4+
"version": "1.0.19",
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+
MatchedFailedRequest = "matched_failed_request",
2526
}
2627

2728
interface APIError {
@@ -33,6 +34,15 @@ interface APIError {
3334
}
3435

3536
const allErrors: Record<ErrorCode, APIError> = {
37+
[ErrorCode.MatchedFailedRequest]: {
38+
httpStatusCode: 500,
39+
title: "Matched Failed Request",
40+
code: "matched_failed_request",
41+
description:
42+
"A request matched by the specified pattern by the `fail_if_request_failed` option has been failed. If it seems to be a mistake or not what you expected, please, reach out to `support@screenshotone.com` as quickly as possible, and we will assist and try to resolve your problem.",
43+
documentationUrl:
44+
"https://screenshotone.com/docs/errors/matched-failed-request/",
45+
},
3646
[ErrorCode.InvalidCookieParameter]: {
3747
httpStatusCode: 400,
3848
title: "Invalid Cookie Parameter",

0 commit comments

Comments
 (0)