Skip to content

Commit

Permalink
Better error on api fetch fail
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavaviram committed Aug 29, 2023
1 parent 293496f commit 699753c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function fetchDomainDetails(domain) {
if (response.status <= 400) {
return response.json();
}
throw new Error(`HTTP error ${response.status} from ${url}`);
throw new Error(`HTTP error ${response.status} from '${url}', headers: ${request.headers}`);
})
.then((json) => {
return json;
Expand Down

0 comments on commit 699753c

Please sign in to comment.