Conversation
mdimjasevic
left a comment
There was a problem hiding this comment.
A couple of minor suggestions are inlined.
CHANGELOG.md
Outdated
There was a problem hiding this comment.
This is a federation-api-backwards-incompatible change (since router.proto changes), which is fine right now, but we'd need to be more careful about this in the future. Could be added to the changelog like here: https://github.com/wireapp/wire-server/blob/develop/CHANGELOG.md#internal-federation-api-changes
There was a problem hiding this comment.
If we had kept the existing field indices, then I think this sort of change should be backwards compatible. Is this right?
There was a problem hiding this comment.
Yes, if the meaning and the numbers stay, but only things are added, it's backwards compatible. If indices change or are removed it's not.
So far so good, no need for backwards compatibility concerns just yet.
|
Thanks for approving @jschaul. I marked this PR as a draft, because I wanted to use it to work on reorganising the error codes and clean up error handling. Should I instead merge it as is, and do that in a separate PR? |
As you wish, I think this is not urgent to get merged, so feel free to keep it around and organize errors a but differently first. Whatever is more convenient. Another thought crossed my mind: I noticed when doing a manual test that currently the behaviour of the webapp on a 400 (federation not allowed) is, they stop. And on the 525 errors, the webapp retried the request about 10 times. So I wonder if there should be some guidance we can give on these different errors about what e.g. the client could do (retry later, or not), or what the user could do. Some of this discussion could happen with involvement of more parties, but some things could also be added to the description perhaps. |
Good point, I added it as a TODO item. |
eea86a8 to
8206b34
Compare
16bfcb4 to
9971c36
Compare
Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com>
It is currently not so easy to distinguish this particular error from a generic TLS error (see #1662 for more context). Since `InvalidCertificate` is never thrown, this PR simply removes it. Note that this is a breaking change in the federation protobuf.
Also suggest client behaviour in some cases.
4a5a259 to
13ae508
Compare
This adds documentation of federation errors to Swagger. These are not response entries by endpoints, but simply a list of errors (with some brief explanations) divided into categories. They apply more or less to all endpoints that have anything to do with federation.
I also pasted it here so it is possible to see it rendered without building anything: https://gist.github.com/pcapriotti/e50f61c3a8f6abab900e25c9ff3457aa.
TODO
Rethink some of the error codesAfter some discussion, we decided the error codes are mostly fine
Checklist
make git-add-cassandra-schemato update the cassandra schema documentation.