make NAME field non-optional for Gear, Tome, Charm
This commit is contained in:
parent
84e696bea2
commit
6313b56064
2 changed files with 7 additions and 0 deletions
|
@ -42,4 +42,8 @@ pub enum Errorfr {
|
|||
/// unable to copy (write in) file content
|
||||
#[error("Error 3.4: Download successful, but unable to write to file.")]
|
||||
JsonDlReqFileWriteFail,
|
||||
|
||||
/// Name value was not found in json
|
||||
#[error("Error 3.4: \"Name\" field was not found in the json (required for Gear, Tome, Charm)")]
|
||||
JsonNotFoundName
|
||||
}
|
||||
|
|
|
@ -135,6 +135,9 @@ fn cook(
|
|||
if let Some(real_name) = json_config.name {
|
||||
encode_namedata(&mut fr_params, &real_name)
|
||||
}
|
||||
else {
|
||||
return Err(Errorfr::JsonNotFoundName)
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue