An application should never panic due to user error, and instead return/bubble up an error which can also be discarded if need be.
Currently a lot of functions will panic if IO operation goes wrong (utils::read_file_to_string, utils::check_dotfiles), an file or environment variable is malformed (auth::get_token)...
These should ideally just use the common error type and use ? to convert all IO errors etc to it, and bubble them up.
An application should never panic due to user error, and instead return/bubble up an error which can also be discarded if need be.
Currently a lot of functions will panic if IO operation goes wrong (
utils::read_file_to_string
,utils::check_dotfiles
), an file or environment variable is malformed (auth::get_token
)...These should ideally just use the common error type and use
?
to convert all IO errors etc to it, and bubble them up.