Skip to content

Commit

Permalink
fix: report err return type
Browse files Browse the repository at this point in the history
  • Loading branch information
frdomovic committed Nov 13, 2024
1 parent 486b318 commit 7af1fa5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/server/src/admin/handlers/proposals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub async fn get_proposals_handler(
},
}
.into_response(),
Err(_) => "failed to fetch proposals".into_response(),
Err(err) => parse_api_error(err).into_response(),
}
}

Expand All @@ -151,7 +151,7 @@ pub async fn get_proposal_handler(
},
}
.into_response(),
Err(_) => "failed to fetch proposal".into_response(),
Err(err) => parse_api_error(err).into_response(),
}
}

Expand All @@ -177,7 +177,7 @@ pub async fn get_number_of_active_proposals_handler(
},
}
.into_response(),
Err(_) => "failed to fetch proposal".into_response(),
Err(err) => parse_api_error(err).into_response(),
}
}

Expand All @@ -202,7 +202,7 @@ pub async fn get_number_of_proposal_approvals_handler(
},
}
.into_response(),
Err(_) => "failed to fetch proposal approvals".into_response(),
Err(err) => parse_api_error(err).into_response(),
}
}

Expand All @@ -229,7 +229,7 @@ pub async fn get_proposal_approvers_handler(
},
}
.into_response(),
Err(_) => "failed to fetch proposal".into_response(),
Err(err) => parse_api_error(err).into_response(),
}
}

Expand Down

0 comments on commit 7af1fa5

Please sign in to comment.