packaging: setup: better exception handling on APIs connection

Better handling of APIs connection errors better discriminating
and reporting them.
Adding some debug log lines.

Bug-Url: https://bugzilla.redhat.com/1168267
Change-Id: I13a286ffaac955b821de830a4562413ee071c860
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>