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

Unexpected error code for invalid param on "/_matrix/client/r0/publicRooms" endpoint #4381

Closed
poulad opened this issue Jan 13, 2019 · 1 comment
Labels
A-Spec-Compliance places where synapse does not conform to the spec z-p2 (Deprecated Label)

Comments

@poulad
Copy link

poulad commented Jan 13, 2019

Description

API returns the error code M_UNKNOWN instead of M_INVALID_PARAM for an invalid parameter in the request.

Steps to reproduce

Call listing public rooms endpoint with the invalid type of parameter: string instead of integer for the limit.

curl "https://matrix.org/_matrix/client/r0/publicRooms?limit=NOT_INTEGER"

Expected Result

{
    "errcode": "M_INVALID_PARAM",
    "error": "Query parameter 'limit' must be an integer"
}

Actual Result

{
    "errcode": "M_UNKNOWN",
    "error": "Query parameter b'limit' must be an integer"
}

Version information

  • Homeserver: matrix.og
@neilisfragile neilisfragile added A-Spec-Compliance places where synapse does not conform to the spec z-p2 (Deprecated Label) labels Jan 16, 2019
@aaronraimist
Copy link
Contributor

aaronraimist commented Jun 11, 2019

This was fixed

⟩ curl "https://matrix.org/_matrix/client/r0/publicRooms?limit=NOT_INTEGER"

{
    "errcode": "M_INVALID_PARAM",
    "error": "Query parameter b'limit' must be an integer"
}

@ara4n ara4n closed this as completed Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Spec-Compliance places where synapse does not conform to the spec z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

4 participants