Skip to content

Commit 0e80244

Browse files
Return the time for the quotas to renew when returning a query limit error
1 parent fa9640b commit 0e80244

File tree

1 file changed

+6
-1
lines changed
  • aggregation_mode/batcher/src/server

1 file changed

+6
-1
lines changed

aggregation_mode/batcher/src/server/http.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,13 @@ impl BatcherServer {
116116
};
117117

118118
if daily_tasks_by_address >= state.config.max_daily_proofs_per_user {
119+
let formatted_time_left = get_time_left_day_formatted();
120+
119121
return HttpResponse::InternalServerError().json(AppResponse::new_unsucessfull(
120-
"Request denied: Query limit exceeded.",
122+
format!(
123+
"Request denied: Query limit exceeded. Quotas renew in {formatted_time_left}"
124+
)
125+
.as_str(),
121126
400,
122127
));
123128
}

0 commit comments

Comments
 (0)