Skip to content

Commit 98475bd

Browse files
committed
fix: fixed status for server error
1 parent 06a1039 commit 98475bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ProjectCompartor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function ProjectComparator() {
2424
const response = await fetch(
2525
getScorecardUrl({ platform, org, repo, commitHash: prevCommitHash })
2626
);
27-
if (response.status >= 400) {
27+
if (response.status >= 500) {
2828
throw new Error("An error ocurred. Invalid response from server");
2929
}
3030
return response.json();
@@ -37,7 +37,7 @@ function ProjectComparator() {
3737
const response = await fetch(
3838
getScorecardUrl({ platform, org, repo, commitHash: currentCommitHash })
3939
);
40-
if (response.status >= 400) {
40+
if (response.status >= 500) {
4141
throw new Error("An error ocurred. Invalid response from server");
4242
}
4343
return response.json();

0 commit comments

Comments
 (0)