15.7 Downcasting Errors with Any
Right, so you’ve got your error all boxed up in an anyhow::Error. It’s wonderfully convenient, but now you need to actually do something with it. You can’t just shrug and say “something went wrong” to the user; you need to tell them their database connection string was malformed, or that the configuration file is missing a required section. This is where we go from error handling to error interrogation. We need to crack that anyhow::Error open to see what’s inside. The process is called downcasting.