feat: improve error handling and add documentation
This commit is contained in:
1 parent
ddfac3dc2e
commit
f74e5ca093
2 files changed
+53
-11
No files matched your search
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user