Skip to content

Commit a20f65e

Browse files
committed
Refactor: Try to revert to simple conversion of errors to as exact as I can
1 parent 8294627 commit a20f65e

File tree

10 files changed

+850
-669
lines changed

10 files changed

+850
-669
lines changed

common/src/rest_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl RESTError {
4242

4343
/// Parameter missing error
4444
pub fn param_missing(param_name: &str) -> Self {
45-
RESTError::BadRequest(format!("{} parameter is missing", param_name))
45+
RESTError::BadRequest(format!("Missing {} parameter", param_name))
4646
}
4747

4848
/// Invalid parameter error

common/src/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ impl fmt::Display for RewardType {
251251
}
252252

253253
pub type PolicyId = [u8; 28];
254-
255254
pub type NativeAssets = Vec<(PolicyId, Vec<NativeAsset>)>;
256255
pub type NativeAssetsDelta = Vec<(PolicyId, Vec<NativeAssetDelta>)>;
257256
pub type NativeAssetsMap = HashMap<PolicyId, HashMap<AssetName, u64>>;

modules/drdd_state/src/rest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub async fn handle_drdd(
3131
Some(drdd) => Some(drdd),
3232
None => {
3333
return Err(RESTError::not_found(&format!(
34-
"DRDD not found for epoch {}",
34+
"DRDD in epoch {}",
3535
epoch
3636
)));
3737
}

0 commit comments

Comments
 (0)