Skip to content

Commit

Permalink
examples: Do not swallow possible errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxuser committed Dec 21, 2023
1 parent b29fb97 commit 295ad76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/src/bin/auth_azure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ impl AuthPromptCallback for HttpCallbackHandler {

#[tokio::main]
async fn main() -> Result<(), Error> {
eprintln!("NOTE: --flow authorization-code required!");
auth_main(
XalAppParameters {
app_id: "388ea51c-0b25-4029-aae2-17df49d23905".into(),
Expand All @@ -76,8 +77,7 @@ async fn main() -> Result<(), Error> {
redirect_url_base: "http://localhost:8080".into(),
},
)
.await
.ok();
.await?;

Ok(())
}
3 changes: 1 addition & 2 deletions examples/src/bin/auth_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use xal_examples::auth_main_default;
#[tokio::main]
async fn main() -> Result<(), Error> {
auth_main_default(AccessTokenPrefix::None, CliCallbackHandler)
.await
.ok();
.await?;

Ok(())
}
3 changes: 1 addition & 2 deletions examples/src/bin/auth_webview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ async fn main() -> Result<(), Error> {
};

auth_main_default(AccessTokenPrefix::None, callback_handler)
.await
.ok();
.await?;

Ok(())
}

0 comments on commit 295ad76

Please sign in to comment.