-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: print-env when missing data #44
base: main
Are you sure you want to change the base?
Conversation
@@ -2,15 +2,19 @@ use crate::prelude::*; | |||
|
|||
pub(crate) async fn command(context: &mut Context) -> Result<()> { | |||
let package = context.unwrap_package_id(); | |||
let atoma_db = context.get_or_load_atoma_db().await?; | |||
let manager_badge = context.get_or_load_db_manager_badge().await?; | |||
let atoma_db = context.get_or_load_atoma_db().await.ok(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you encounter this error anyway? There should always be atoma DB and manager badge if you provide a correct package ID. Not sure if we should be silent on the error because that means something went very wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when I register a node from a non admin account
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't matter if it's non admin or not, everyone needs to know atoma DB and everyone can know it. What error did you get? Can you replicate? You cannot register a node without knowing the object ID of the DB.
When missing some data, print everything you can instead of failing.