Skip to content

Commit

Permalink
fix low funds error
Browse files Browse the repository at this point in the history
  • Loading branch information
Firaenix committed Sep 13, 2020
1 parent a0f39c6 commit eb97489
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/job_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ pub async fn post_job(request: &CreateJobAPIRequest, token: &str) -> std::result
}
};


if res.status() == StatusCode::PAYMENT_REQUIRED {
return Err(job_errors::JobErrors::LowFunds)
}

let api_response: CreateJobAPIResponse = res.json::<CreateJobAPIResponse>().await?;

Expand Down

0 comments on commit eb97489

Please sign in to comment.