Shouldn't the construction of the Credentials with Credentials::new and Credentials::with_base both return a Result, instead of just panicking?