mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Msp dashboard: Add more debug logging to software actions. (#24339)
Changes: - (msp dashboard) Updated the edit-software and upload-software endpoints to log more information about errors when requests to upload a software installer fail.
This commit is contained in:
parent
1eb71674fa
commit
eb1c2f5c44
2 changed files with 5 additions and 5 deletions
|
|
@ -201,7 +201,7 @@ module.exports = {
|
|||
if(_.startsWith(errorMessageFromFleetInstance, `Couldn't add. Fleet couldn't read the version`)){
|
||||
return 'couldNotReadVersion';
|
||||
} else {
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API. Error returned from Fleet API: ${errorMessageFromFleetInstance}`);
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API. Error returned from Fleet API: ${errorMessageFromFleetInstance} \n Axios error: ${require('util').inspect(error, {depth: 3})}`);
|
||||
return {'softwareUploadFailed': error};
|
||||
}
|
||||
}
|
||||
|
|
@ -218,7 +218,7 @@ module.exports = {
|
|||
await sails.rm(sails.config.uploads.prefixForFileDeletion+softwareFd);
|
||||
}
|
||||
// Log a warning containing an error
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API, Full error: ${require('util').inspect(error, {depth: 2})}`);
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API, Full error: ${require('util').inspect(error, {depth: 3})}`);
|
||||
return {'softwareUploadFailed': error};
|
||||
});
|
||||
// console.timeEnd(`transfering ${software.name} to fleet instance for team id ${team}`);
|
||||
|
|
@ -294,7 +294,7 @@ module.exports = {
|
|||
if(_.startsWith(errorMessageFromFleetInstance, `Couldn't add. Fleet couldn't read the version`)){
|
||||
return 'couldNotReadVersion';
|
||||
} else {
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API. Error returned from Fleet API: ${errorMessageFromFleetInstance}`);
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API. Error returned from Fleet API: ${errorMessageFromFleetInstance} \n Axios error: ${require('util').inspect(error, {depth: 3})}`);
|
||||
return {'softwareUploadFailed': error};
|
||||
}
|
||||
}
|
||||
|
|
@ -311,7 +311,7 @@ module.exports = {
|
|||
await sails.rm(sails.config.uploads.prefixForFileDeletion+softwareFd);
|
||||
}
|
||||
// Log a warning containing an error
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API, ${require('util').inspect(error, {depth: 2})}`);
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API, ${require('util').inspect(error, {depth: 3})}`);
|
||||
return {'softwareUploadFailed': error};
|
||||
});
|
||||
// console.timeEnd(`transfering ${software.name} to fleet instance for team id ${teamApid}`);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ module.exports = {
|
|||
if(_.startsWith(errorMessageFromFleetInstance, `Couldn't add. Fleet couldn't read the version`)){
|
||||
return 'couldNotReadVersion';
|
||||
} else {
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API. Error returned from Fleet API: ${errorMessageFromFleetInstance}`);
|
||||
sails.log.warn(`When attempting to upload a software installer, an unexpected error occurred communicating with the Fleet API. Error returned from Fleet API: ${errorMessageFromFleetInstance} \n Axios error: ${require('util').inspect(error, {depth: 3})}`);
|
||||
return {'softwareUploadFailed': error};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue