Skip to content

Commit 9d30808

Browse files
committed
fix(index.ts): fix error return message
1 parent 6b98ccb commit 9d30808

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/__tests__/FetchReadme.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('Fetch Readme', () => {
5858
try {
5959
await fetchReadme(nonExistentReadmeConfiguration)
6060
} catch (error) {
61-
expect(error).toMatch('404 - Unable to find a readme.md.s')
61+
expect(error).toMatch('404 - Unable to find a readme.md.')
6262
}
6363
})
6464

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const fetchReadme = async (config: IFetchReadmeConfig) => {
7777
validateConfigurationObject(config)
7878
return await getGithubReadmeForRepository(config)
7979
} catch (error) {
80-
return new Error(error)
80+
throw error.message
8181
}
8282
}
8383

0 commit comments

Comments
 (0)