mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 21:53:51 +00:00
fix(release): retry commit history gateway timeouts (#12377)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
This commit is contained in:
1 parent
e9af636128
commit
80e8bbc871
3 files changed
+44
-9
No files matched your search
@@ -15,8 +15,12 @@ const patch = fileURLToPath(
|
||||
|
||||
export function describeReleaseProposalError(error) {
|
||||
if (!(error instanceof Error)) return String(error);
|
||||
const description = error.message || error.name || "Unknown error";
|
||||
const status = error.status;
|
||||
const description = /^\s*<(?:!doctype\s+html\b|html[\s>])/iu.test(
|
||||
error.message,
|
||||
)
|
||||
? "GitHub returned an HTML error response"
|
||||
: error.message || error.name || "Unknown error";
|
||||
return Number.isInteger(status) && status >= 400 && status <= 599
|
||||
? `${description} (HTTP ${status})`
|
||||
: description;
|
||||
|
||||
Reference in new issue
Block a user