Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(send_queue): Persist failed to send errors #4137
feat(send_queue): Persist failed to send errors #4137
Changes from 2 commits
e769600
a5e5c02
e824fd2
3e65753
3511c69
93c4528
3586dd6
e304cb4
6d65a8d
5b911da
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update this doc comment, since an identical one was added below to
is_wedged()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is context around what it means to have an error; I'd rather put that near the
error
field itself, and have the doc comment here say something like "returns whether the queued event is wedged (i.e. ran into an unrecoverable error) or not"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is related to the send queue, can we put it in the send queue file? Or is there a reason I'm missing to put it into deserialized_responses?
Also, should this use our common pattern of deriving
thiserror::Error
, to make it clear it's an error type, and would avoid the manual display impl? (uniffi also has anuniffi::Error
derive which could be convenient here)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Send Queue is in
matrix-sdk
and this error is persisted in the state storagematrix-sdk-base
.So it cannot be in the send_queue.rs file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, can we put those in
matrix-sdk-base
next to theQueueEvent
type, then? (or in a new file send_queue.rs somewhere in that crate)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside the FFI layer, we're not using stringly-typing, so this would become a
HashMap<OwnedUserId, Vec<OwnedDeviceId>>
, and similarly below.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see 3e65753
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vec<OwnedUserId>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see here #4137 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be a
Box<dyn Error>
or something similar? It's a bit weird to store the stringified error, since API users can't match on it, unless they precisely know what string to expect.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see here #4137 (comment)