Fixing bug where an error that returned a 2xx response caused the client to hang.