Fixes #232 by handling errors explicitly rather than trying to parse status codes and ready states.