Check for parser errors

Previously it was assumed that the header done callback would be called always, even for errors. However that appears to be false and instead we need to check after each chunk to see if we're complete, incomplete, or errored.