amidaware / rmmagent

Tactical RMM Agent
https://github.com/amidaware/tacticalrmm
Other
132 stars 76 forks source link

Error Handling for NewAgentConfig #18

Closed redanthrax closed 2 years ago

redanthrax commented 2 years ago

If NewAgentConfig had an error an empty agent config would be returned and the agent would continue. Added error handling for the instance an empty config was returned and logged the error.

wh1te909 commented 2 years ago

this won't work, a new agent install will crash before it gets to the install function because the config won't exist during fresh install. This is why I intentionally did not make that function return an error. It would require more rework to account for new installs and also any other function that occurs after this line which some of those are used for debugging and don't necessarily require the agent to be installed or have a config.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.