[glance-api] Add curl error handling on API calls to avoid python tracebacks

- Empty response from keystone/glance API is now managed
- Add error handling on empty credentials