From b3b8e4b80d06c23fbd1c46b737573c5ce6004505 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Mon, 16 Sep 2024 19:11:20 -0700 Subject: [PATCH] chore: improve error message when api key not set --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 2320cb3..e7388ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ use std::env; #[tokio::main] async fn main() -> Result<(), Error> { let token = - env::var("CANVAS_SECRET").expect("Canvas API key is not defined in the environment."); + env::var("CANVAS_SECRET").expect("Canvas API key is not defined in the environment. Please set environment variable `CANVAS_SECRET`."); // Base URL must have trailing slash or URL `.join()` will not work let client = CanvasClient::create(