Skip to content

Commit d69e3d4

Browse files
authored
Merge pull request #7 from Maddimax/releases/v2.4
Fix error output
2 parents 6da54d6 + 1b3d685 commit d69e3d4

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

__tests__/main.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ describe('action', () => {
149149
}
150150
})
151151

152-
fetchMock.mockResponseOnce('Something went wrong', { status: 400 })
152+
fetchMock.mockResponseOnce('Something went wrong', {
153+
status: 400,
154+
statusText: 'Bad Request'
155+
})
153156
await main.run()
154157
expect(setFailedMock).toHaveBeenCalledWith(
155158
'HTTP Error: Something went wrong'

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/extensionstore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ async function request(
174174
})
175175
if (!response.ok) {
176176
throw new Error(
177-
`HTTP Error: ${(response.status, response.statusText, response.body)}`
177+
`HTTP Error: ${(response.status, response.statusText, await response.text())}`
178178
)
179179
}
180180
return await response.json()

0 commit comments

Comments
 (0)