fixed errorMessage reporting
This commit is contained in:
parent
7fab576e6a
commit
7eb6d15d4b
|
@ -34,7 +34,7 @@ async function uploadCheck(done) {
|
||||||
async function downloadCheck(done) {
|
async function downloadCheck(done) {
|
||||||
const time = process.hrtime();
|
const time = process.hrtime();
|
||||||
const skylink = "AACogzrAimYPG42tDOKhS3lXZD8YvlF8Q8R17afe95iV2Q";
|
const skylink = "AACogzrAimYPG42tDOKhS3lXZD8YvlF8Q8R17afe95iV2Q";
|
||||||
let statusCode, errorResponseContent;
|
let statusCode, errorMessage, errorResponseContent;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await got(`${process.env.PORTAL_URL}/${skylink}?nocache=true`);
|
const response = await got(`${process.env.PORTAL_URL}/${skylink}?nocache=true`);
|
||||||
|
@ -50,6 +50,7 @@ async function downloadCheck(done) {
|
||||||
name: "download_file",
|
name: "download_file",
|
||||||
up: statusCode === StatusCodes.OK,
|
up: statusCode === StatusCodes.OK,
|
||||||
statusCode,
|
statusCode,
|
||||||
|
errorMessage,
|
||||||
errorResponseContent,
|
errorResponseContent,
|
||||||
time: calculateElapsedTime(time),
|
time: calculateElapsedTime(time),
|
||||||
});
|
});
|
||||||
|
|
Reference in New Issue