-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new error type: content_missing_specified_string
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ export enum ErrorCode { | |
HostReturnedError = "host_returned_error", | ||
StorageReturnedTransientError = "storage_returned_transient_error", | ||
ContentContainsSpecifiedString = "content_contains_specified_string", | ||
ContentMissingSpecifiedString = "content_missing_specified_string", | ||
TemporaryUnavailable = "temporary_unavailable", | ||
ResultingImageTooLarge = "resulting_image_too_large", | ||
InvalidCookieParameter = "invalid_cookie_parameter", | ||
|
@@ -104,6 +105,15 @@ const allErrors: Record<ErrorCode, APIError> = { | |
documentationUrl: | ||
"https://screenshotone.com/docs/errors/host-returned-error/", | ||
}, | ||
[ErrorCode.ContentMissingSpecifiedString]: { | ||
httpStatusCode: 500, | ||
title: "Content Missing Specified String", | ||
code: "content_missing_specified_string", | ||
description: | ||
"The page content is missing the specified string by the `fail_if_content_missing` option. If it seems to be a mistake or not what you expected, please, reach out to `[email protected]` as quickly as possible, and will assist and try to resolve your problem.", | ||
documentationUrl: | ||
"https://screenshotone.com/docs/errors/content-missing-specified-string/", | ||
}, | ||
[ErrorCode.ContentContainsSpecifiedString]: { | ||
httpStatusCode: 500, | ||
title: "Content Contains Specified String", | ||
|