throws IO error when HTTP error event isn't prevented