stream safety when parsing an error