Skip to content

Commit

Permalink
Make error messages more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
grubersjoe committed Jan 18, 2024
1 parent 2161396 commit 6443700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "github-contribution-api",
"description": "Scrape contribution data of a Github user",
"version": "4.6.2",
"version": "4.6.3",
"author": "Jonathan Gruber <[email protected]>",
"license": "MIT",
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions src/scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ const parseDay = (
};

if (!attr.date) {
throw Error('Unable to parse date attribute.');
throw Error('Unable to parse contribution date attribute.');
}

if (!attr.level) {
throw Error('Unable to parse level attribute.');
throw Error('Unable to parse contribution level attribute.');
}

let count = 0;
Expand Down Expand Up @@ -236,6 +236,6 @@ export async function scrapeGitHubContributions(

export class UserNotFoundError extends Error {
constructor(username: string) {
super(`User '${username}' not found`);
super(`User "${username}" not found.`);
}
}

0 comments on commit 6443700

Please sign in to comment.