No. In languages like F#, you can encode in the type system that the result can be either a customer or an error. And the compiler won't let you "access" the customer until you've safely checked that the result is, indeed, the customer rather than an error.
In this way you end up encoding more intent within your types and behaviours rather than implicitly letting the consumer figure it out themselves.