Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
krasun committed Jun 16, 2024
1 parent 5b261c5 commit 08002fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "screenshotone-api-sdk",
"homepage": "https://screenshotone.com",
"version": "1.1.10",
"version": "1.1.11",
"description": "Use ScreenshotOne.com API to generate screenshots of any website.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class Client {
const data = await response.json();

throw new Error(
`failed to take screenshot, response returned ${response.status} ${response.statusText}: ${data?.message}`
`failed to take screenshot, response returned ${response.status} ${response.statusText}: ${data?.error_message}`
);
} catch (e) {
throw new Error(
Expand All @@ -121,7 +121,7 @@ export class Client {
const data = await response.json();

throw new Error(
`failed to generate animation, response returned ${response.status} ${response.statusText}: ${data?.message}`
`failed to generate animation, response returned ${response.status} ${response.statusText}: ${data?.error_message}`
);
} catch (e) {
throw new Error(
Expand Down

0 comments on commit 08002fd

Please sign in to comment.