Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was 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

@poulad

Description

@poulad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Spec-Complianceplaces where synapse does not conform to the specz-p2(Deprecated Label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions