Skip to content

Commit

Permalink
chore(nfts): improve error message on fetch fail
Browse files Browse the repository at this point in the history
  • Loading branch information
MuckT committed Jun 30, 2023
1 parent 103e6c1 commit 4573c5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/nfts/saga.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('Given Nfts saga', () => {
.provide([[select(walletAddressSelector), '0xabc']])
.put(
fetchNftsFailed({
error: 'Could not fetch NFTs',
error: 'Unable to fetch NFTs: 500 Internal Server Error',
})
)
.run()
Expand Down
2 changes: 1 addition & 1 deletion src/nfts/saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function* handleFetchNfts() {
},
})
if (!response.ok) {
throw new Error('Could not fetch NFTs')
throw new Error(`Unable to fetch NFTs: ${response.status} ${response.statusText}`)
}
const { result } = yield call([response, 'json'])
yield put(fetchNftsCompleted(result))
Expand Down

0 comments on commit 4573c5e

Please sign in to comment.