Skip to content

Commit bff5187

Browse files
committed
fix(relay): aggregator relay accepts 202 codes
When submitting signature to an aggregator with the REST API.
1 parent db589f3 commit bff5187

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mithril-relay/src/relay/aggregator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ impl AggregatorRelay {
4242
.await;
4343
match response {
4444
Ok(response) => match response.status() {
45-
StatusCode::CREATED => {
45+
StatusCode::CREATED | StatusCode::ACCEPTED => {
4646
info!(self.logger, "Sent successfully signature message to aggregator"; "signature_message" => #?signature_message);
4747
Ok(())
4848
}
4949
status => {
50-
error!(self.logger, "Post `/register-signatures` should have returned a 201 status code, got: {status}");
51-
Err(anyhow!("Post `/register-signatures` should have returned a 201 status code, got: {status}"))
50+
error!(self.logger, "Post `/register-signatures` should have returned a 201 or 202 status code, got: {status}");
51+
Err(anyhow!("Post `/register-signatures` should have returned a 201 or 202 status code, got: {status}"))
5252
}
5353
},
5454
Err(err) => {

0 commit comments

Comments
 (0)