Skip to content

Commit

Permalink
Merge branch 'ke/import-better-error' of https://github.com/kitspace/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitspace Auto-Merge Bot committed Jan 18, 2024
2 parents 28e56e7 + e105bc6 commit 8e90249
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/importBoardsTxt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ async function mirrorRepo(
})

if (!response.ok) {
let message = 'Unknown error'
try {
message = (await response.json()).message
} catch (e) {}
throw new Error(
`Failed to mirror ${remoteRepo} to ${user.username}/${repoName}`,
`Failed to mirror ${remoteRepo} to ${user.username}/${repoName}: ${response.status}: ${message}`,
)
}
}
Expand Down

0 comments on commit 8e90249

Please sign in to comment.