Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Map faucet error to tide error #1198

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion faucet/src/faucet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,14 @@ async fn request_fee_assets(
) -> Result<tide::Response, tide::Error> {
check_service_available(req.state()).await?;
let pub_key: UserPubKey = net::server::request_body(&mut req).await?;
response(&req, &req.state().queue.push(pub_key).await?)
response(
&req,
&req.state()
.queue
.push(pub_key)
.await
.map_err(faucet_server_error)?,
)
}

async fn worker(id: usize, mut state: FaucetState) {
Expand Down