Skip to content

Commit d47829a

Browse files
committed
Add request_body_too_large error
1 parent 49a0c2a commit d47829a

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.20",
4+
"version": "1.0.21",
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
@@ -24,6 +24,7 @@ export enum ErrorCode {
2424
InvalidCookieParameter = "invalid_cookie_parameter",
2525
InvalidHeaderParameter = "invalid_header_parameter",
2626
MatchedFailedRequest = "matched_failed_request",
27+
RequestBodyTooLarge = "request_body_too_large",
2728
}
2829

2930
interface APIError {
@@ -35,6 +36,15 @@ interface APIError {
3536
}
3637

3738
const allErrors: Record<ErrorCode, APIError> = {
39+
[ErrorCode.RequestBodyTooLarge]: {
40+
httpStatusCode: 413,
41+
title: "Request Body Too Large",
42+
code: "request_body_too_large",
43+
description:
44+
"The request body is too large. Please, reduce the size of the request body or reach out to `support@screenshotone.com` for assistance.",
45+
documentationUrl:
46+
"https://screenshotone.com/docs/errors/request-body-too-large/",
47+
},
3848
[ErrorCode.MatchedFailedRequest]: {
3949
httpStatusCode: 500,
4050
title: "Matched Failed Request",

0 commit comments

Comments
 (0)