Design patterns·Modelling the domain
the two ids were both strings, you passed them in the wrong order, and nothing complained until production.
Tiny type
Also calledmicro type, wrapper type, typed identifier
A one-field value object wrapping a primitive so the type system can tell a customer id from an order id. It is the cheapest available cure for primitive obsession and for the class of bug where two same-typed arguments get swapped. The objection is boilerplate, which is real in some languages and nearly zero in those with value classes or type aliases with checking.