Consider:
Invoke-WebRequest $sumoApiURL -Headers @{\"Content-Type\"= \"application/json\"} -Credential $cred -WebSession $webRequestSession -Method post -Bod
I found it!
Simply print out $Error[0] for the last error message.
$Error[0]