The error parameter should not default to 0. Most quantities are measured values, not mathematical objects, and measurements are never absolutely exact. Getting this wrong will lead to false precision to be introduced by unit conversion.
Any code that constructs quantities should be forced to think about how to determine the error margin. When only a single number string is available, the margin of uncertainty can be determined from the number of (significant) digits. In such a case it's however best to use the wikidata API to do the parsing, see T112140.