Skip to content

Commit

Permalink
fix(index.ts): fix error return message
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreVarandas committed Jan 20, 2019
1 parent 6b98ccb commit 9d30808
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/FetchReadme.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Fetch Readme', () => {
try {
await fetchReadme(nonExistentReadmeConfiguration)
} catch (error) {
expect(error).toMatch('404 - Unable to find a readme.md.s')
expect(error).toMatch('404 - Unable to find a readme.md.')
}
})

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const fetchReadme = async (config: IFetchReadmeConfig) => {
validateConfigurationObject(config)
return await getGithubReadmeForRepository(config)
} catch (error) {
return new Error(error)
throw error.message
}
}

Expand Down

0 comments on commit 9d30808

Please sign in to comment.