core
core copied to clipboard
[network controller] Log when we fail to connect to a network
The lookupNetwork
method of the network controller should include console warnings for all branches where we fail to connect to a network. This would be very useful when investigating bug reports.
Failing to connect to a network is in a class of errors that is expected, but still noteworthy and potentially related to a bug. Console warnings are a good solution for these situations; they provide hints in the console for anyone investigating, and they show up in Sentry if a real error is thrown in the vicinity of the warning.
Rather than using console.log
directly, we should consider updating the controller to accept a loglevel
instance, so that we can use that to print console warnings while leaving the client in full control of whether these logs are enabled or not.
Status is not enough. It just says "unavailable" but we don't know why. We'd like to know why. Arguably it is already correct but it might be useful to expose the actual error.