Handle 502 Bad Gateway

This PR:
- raises an error when BIT returns a 502 bad gateway
- raises a unique error for 500 internal server
- tests errors
- bumps version