Replicate #168 with failing test
Handle nil http codes from API

Resolves #168