| ▲ | tptacek 3 hours ago | ||||||||||||||||||||||||||||||||||
What people are saying is that idiomatic prod rust doesn't use unwrap/expect (both of which panic on the "exceptional" arm of the value) --- instead you "match" on the value and kick the can up a layer on the call chain. | |||||||||||||||||||||||||||||||||||
| ▲ | olivia-banks 3 hours ago | parent [-] | ||||||||||||||||||||||||||||||||||
What happens to it up the callstack? Say they propagated it up the stack with `?`. It has to get handled somewhere. If you don't introduce any logic to handle the duplicate databases, what else are you going to do when the types don't match up besides `unwrap`ing, or maybe emitting a slightly better error message? You could maybe ignore that module's error for that request, but if it was a service more critical than bot mitigation you'd still have the same symptom of getting 500'd. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||