pub fn anyhow_to_app_error(err: Error) -> AppError
Convert anyhow::Error to AppError by inspecting the message.