fixed errorMessage reporting

This commit is contained in:
Karol Wypchlo 2021-04-29 16:59:05 +02:00
parent 7fab576e6a
commit 7eb6d15d4b
1 changed files with 2 additions and 1 deletions

View File

@ -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),
}); });