Similarly I'd probably substitute the optional with a variant that has the actual error code. Go nuts with whatever you want here.
Let's make error code optional, too.