Raising BadResponseException in case of empty response