While running this exporter in the grafana agent, we have identified a loop that never returns in case of http error. This in turn causes the agent to never release a lock, preventing it from making progress.
Note: I have not added additional metrics to report errors as I am trying to keep the scope of this change minimal, but it would be a good idea to add a gauge as stated in the prometheus guidelines.