We will check for an empty response from getSocketReply before trying to parse JSON. Before the empty response check we get the JSON parse error from the JSON module. After the change, we wont try and parse the message that will cause the crash.
Also includes some clangd cleanup.
Added test to verify we dont crash when we receive an empty socket response.
Issues:
This PR: