3 ms·
Four optional fields one for each potential context really strikes me as a code-smell / anti-pattern. Your application gets a new context and you add another f
by fn-mote 1y ago
Four optional fields one for each potential context really strikes me as a code-smell / anti-pattern.
Your application gets a new context and you add another field? There must be a better way to do this.
- Arnavion 1y agoThe better way is to do what I wrote in the first paragraph; ie each layer gets its own error type with a bespoke context type. The second paragraph is about the case where you want to use a single error type.