Skip to content

Commit 6a7648d

Browse files
committed
(wip)
1 parent f26f0d3 commit 6a7648d

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

bin/index.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -85091,7 +85091,7 @@ class RequestError extends Error {
8509185091

8509285092
}
8509385093

85094-
distNode$5.RequestError = RequestError;
85094+
var RequestError_1 = distNode$5.RequestError = RequestError;
8509585095

8509685096
Object.defineProperty(distNode$7, '__esModule', { value: true });
8509785097

@@ -89752,7 +89752,14 @@ function checkThreshold(c, o) {
8975289752
});
8975389753
}
8975489754
var err = function (e) {
89755-
return coreExports.error(e instanceof Error ? e + " Stack: " + e.stack : e);
89755+
return coreExports.error(e instanceof Error
89756+
? e +
89757+
" Stack: " +
89758+
e.stack +
89759+
(e instanceof RequestError_1
89760+
? " Request: " + JSON.stringify(e.request)
89761+
: "")
89762+
: e);
8975689763
};
8975789764
var notFoundMessage = "was not found, please check if the path is valid, or if it exists.";
8975889765
var run = function () { return __awaiter$1(void 0, void 0, void 0, function () {

bin/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { getOctokit } from "@actions/github";
1111
import { context } from "@actions/github/lib/utils";
1212
import { existsSync, readFile } from "fs";
1313
import { promisify } from "util";
14+
import { RequestError } from "@octokit/request-error";
1415

1516
import { chart } from "./chart";
1617
import { fromString } from "./clover";
@@ -188,7 +189,16 @@ function* checkThreshold(c: Stats, o?: Stats) {
188189
}
189190

190191
const err = (e: any) =>
191-
error(e instanceof Error ? e + " Stack: " + e.stack : e);
192+
error(
193+
e instanceof Error
194+
? e +
195+
" Stack: " +
196+
e.stack +
197+
(e instanceof RequestError
198+
? " Request: " + JSON.stringify(e.request)
199+
: "")
200+
: e
201+
);
192202

193203
const notFoundMessage =
194204
"was not found, please check if the path is valid, or if it exists.";

0 commit comments

Comments
 (0)