Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

GET /room_keys/keys?version=$v returns an error if the backup is empty #4056

Closed
manuroe opened this issue Oct 18, 2018 · 2 comments
Closed
Assignees

Comments

@manuroe
Copy link
Contributor

manuroe commented Oct 18, 2018

Discussed at https://matrix.to/#/!uewiilduiDRfPomIha:matrix.org/$15398763772905238xioNB:matrix.org.

Instead returning an empty object, we get this error:

{
    errcode = "M_UNKNOWN";
    error = "No room_keys found";
}
@uhoreg
Copy link
Member

uhoreg commented Oct 20, 2018

It looks like the error is set at https://github.com/matrix-org/synapse/pull/4019/files#diff-5c190c6b2c1bbe2f359c3e41932da2dbR71

I think it makes sense to send an error for /room_keys/keys/${roomId}/${sessionId} if no backup is found (though the errcode = "M_UNKNOWN" should be fixed), but for /room_keys/keys/${roomId} and /room_keys/keys, I think it should just send {"sessions": {}} or {"rooms": {}}.

@richvdh
Copy link
Member

richvdh commented Nov 8, 2018

fixed by #4123

@richvdh richvdh closed this as completed Nov 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants