Skip to content

Conversation

@johnxnguyen
Copy link
Collaborator

@johnxnguyen johnxnguyen commented Jan 24, 2026

TaskWPB-23048 [iOS] Implement POST /mls/key-packages/self/{id}

Issue

Implement key package upload endpoint in WireNetwork.

Testing

Code not live yet.


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@johnxnguyen johnxnguyen changed the base branch from refactor/delete-client-wpb-23045 to develop January 24, 2026 08:34
@johnxnguyen johnxnguyen force-pushed the refactor/key-packages-endpoint-wpb-23048 branch from 569d25b to 9a45f08 Compare January 24, 2026 08:35
@johnxnguyen johnxnguyen force-pushed the refactor/key-packages-endpoint-wpb-23048 branch from 9a45f08 to bcdb1d7 Compare January 24, 2026 08:37
@github-actions
Copy link
Contributor

Test Results

354 tests   354 ✅  7s ⏱️
 35 suites    0 💤
  1 files      0 ❌

Results for commit bcdb1d7.

Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a todo, the rest looks good

.failure(
code: .badRequest,
label: "mls-protocol-error",
error: MLSAPIError.mlsProtocolError(message: "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
            }
        }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that we should aim not to lose the underlying message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants