refactor: implement key package upload endpoint in WireNetwork - WPB-23048#4185
refactor: implement key package upload endpoint in WireNetwork - WPB-23048#4185johnxnguyen wants to merge 5 commits intodevelopfrom
Conversation
569d25b to
9a45f08
Compare
9a45f08 to
bcdb1d7
Compare
Test Results2 740 tests 2 740 ✅ 4m 20s ⏱️ Results for commit be90cd0. ♻️ This comment has been updated with latest results. Summary: workflow run #21509099614 |
netbe
left a comment
There was a problem hiding this comment.
left a todo, the rest looks good
| .failure( | ||
| code: .badRequest, | ||
| label: "mls-protocol-error", | ||
| error: MLSAPIError.mlsProtocolError(message: "") |
There was a problem hiding this comment.
todo: missing the message from failure response:
{
"code": 400,
"label": "mls-protocol-error",
"message": "MLS protocol error"
}
you could do try catch:
do {
try ResponseParser()....
} catch {
if let failureResponse = error as? FailureResponseV0, where failureResponse.label == "mls-protocol-error" {
throw MLSAPIError.mlsProtocolError(message: failureResponse.message)
} else {
throw error
}
}
There was a problem hiding this comment.
Agree that we should aim not to lose the underlying message.
There was a problem hiding this comment.
I understood the message to be "MLS protocol error", but do you think it could be actually something descriptive?
|
|
|
||
| /// Key package credential does not match qualified client ID | ||
|
|
||
| case mlsIdentityMismatch |
There was a problem hiding this comment.
suggestion: attach the message from backend if any to help debugging
| case mlsIdentityMismatch | |
| case mlsIdentityMismatch(message: String) |
| } | ||
| } | ||
|
|
||
| func failure( |
There was a problem hiding this comment.
praise: thanks for providing this



Issue
Implement key package upload endpoint in WireNetwork.
Testing
Code not live yet.
Checklist
[WPB-XXX].UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: