Improved error handling when Energy recorder API is unavailable.