Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ describe('action', () => {
}
})

fetchMock.mockResponseOnce(JSON.stringify({}), { status: 400 })
fetchMock.mockResponseOnce('Something went wrong', { status: 400 })
await main.run()
expect(setFailedMock).toHaveBeenCalled()
expect(setFailedMock).toHaveBeenCalledWith(
'HTTP Error: Something went wrong'
)
})
it('Should create a new plugin if not found', async () => {
getInputMock.mockImplementation(name => {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/extensionstore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ async function request(
body: data ? JSON.stringify(data) : undefined
})
if (!response.ok) {
throw new Error(`HTTP Error: ${(response.status, response.statusText)}`)
throw new Error(
`HTTP Error: ${(response.status, response.statusText, response.body)}`
)
}
return await response.json()
}
Expand Down