feat: improve error handling and add documentation

This commit is contained in:
alphafetus committed 2025-12-19 12:48:22 -05:00
1 parent ddfac3dc2e
commit f74e5ca093
2 files changed
+53 -11

No files matched your search

+2 -2
View File
@@ -32,8 +32,8 @@ pub async fn get_scholarship_info(id: String) -> Result<ExpandableInfo, ServerFn
log!("Found output from API: {:?}", item);
Ok(serde_dynamo::from_item(item)?)
} else {
log!("Couldn't find any values, returning default struct.");
Ok(ExpandableInfo::new(id.clone()))
log!("Couldn't find scholarship with ID {:?}", id);
Err(ServerFnError::new("Couldn't find scholarship with given ID."))
}
}
Err(err) => {