In the @draft API, the error code is passed to the format method.
There is no error code in the toString(). However, to be more future-proof, we should consider moving the error code from format method to the toString() method.
One example of an edge case that should probably set the error code, but doesn't do so because there is no error code in the toString() method, is if you try calling toString() on an invalid FormattedNumber instance, such as one that was created without data.
Moving the error code would also make the design more future-proof, if, for example, the code were refactored such that "heavy-lifting" didn't start occurring until the terminal method.