Skip to content
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

Clarify the responses that should be given when a request is missing arguments #333

Open
turt2live opened this issue Jul 19, 2018 · 4 comments
Labels
A-Client-Server Issues affecting the CS API clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@turt2live
Copy link
Member

Dendrite seems to prefer a 400 M_MISSING_ARGUMENTS while Synapse goes for the 500 M_UNKNOWN route. A consistent error would be nice not only amoung the 2 projects, but in the spec as well.

Applies to all APIs, not just c2s.

@turt2live turt2live added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Jul 19, 2018
turt2live referenced this issue in turt2live/matrix-doc Jul 20, 2018
This removes the Directory and Profile sections, instead opting to document them as Queries. 

The behaviour of profile queries is based on Synapse's behaviour. A few issues have been opened to improve the behaviour:
* matrix-org#1434
* matrix-org#1435
* https://github.com/matrix-org/matrix-doc/issues/1436
* https://github.com/matrix-org/matrix-doc/issues/1437

This fixes matrix-org#1404
@richvdh
Copy link
Member

richvdh commented Jul 23, 2018

It is very obviously a bug to return a 500 error in response to missing or unexpected parameters.

@turt2live
Copy link
Member Author

Yes, but the problem is that it's not in the spec, so it can't entirely be declared a bug despite being obvious.

@richvdh
Copy link
Member

richvdh commented Jul 23, 2018

maybe it should be in the spec. Either way, it's http error code lesson 101:

1xx: hold on
2xx: here you go
3xx: go away
4xx: you fucked up
5xx: I fucked up

I still say it's an obvious bug in synapse which should be fixed.

As for M_UNKNOWN: I'd love it if the spec could say something like "Servers SHOULD only return M_UNKNOWN when no other error code is appropriate. Clients SHOULD NOT rely on it being returned under any particular set of circumstances."

@turt2live
Copy link
Member Author

out of band discussion yielded synapse being buggy in this area. Leaving this open as a general "make it clearer" thing for the spec.

turt2live referenced this issue in turt2live/matrix-doc Jul 24, 2018
This removes the Directory and Profile sections, instead opting to document them as Queries. 

The behaviour of profile queries is based on Synapse's behaviour. A few issues have been opened to improve the behaviour:
* matrix-org#1434
* matrix-org#1435
* https://github.com/matrix-org/matrix-doc/issues/1436
* https://github.com/matrix-org/matrix-doc/issues/1437

This fixes matrix-org#1404
turt2live referenced this issue in turt2live/matrix-doc Jul 26, 2018
This removes the Directory and Profile sections, instead opting to document them as Queries. 

The behaviour of profile queries is based on Synapse's behaviour. A few issues have been opened to improve the behaviour:
* matrix-org#1434
* matrix-org#1435
* https://github.com/matrix-org/matrix-doc/issues/1436
* https://github.com/matrix-org/matrix-doc/issues/1437

This fixes matrix-org#1404
@turt2live turt2live added the A-Client-Server Issues affecting the CS API label Feb 6, 2019
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

2 participants