Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
krasun committed Sep 3, 2023
1 parent 3d17bcb commit a85c104
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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.1",
"version": "1.1.2",
"description": "Use ScreenshotOne.com API to generate screenshots of any website.",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export class Client {
private readonly secretKey: string;

constructor(accessKey: string, secretKey: string) {
if (!accessKey || !secretKey) {
throw new Error(
"Both non-empty access and secret keys are required"
);
}

this.accessKey = accessKey;
this.secretKey = secretKey;
}
Expand Down

0 comments on commit a85c104

Please sign in to comment.