Gracefully handling curl / api errors.

- Handling connection failures
- Handling operation timeouts
- Handling user interrupts
- Handling unknown errors