Skip to content

❗ Unable to fetch rooms from room directory exception: Invalid server name: action:add-new-server #244

Open
@bkil

Description

@bkil

This error occurred after I selected the add new server from the dropbar without JavaScript enabled ( #243 ). But also, if the user typed in an inaccessible HS, they should be greeted with a friendlier message in general.

The exact error we ran into was:

Error: HTTP Error Response: 400 Bad Request: {"errcode":"M_INVALID_PARAM","error":"Invalid server name: action:add-new-server"}
    URL=https://matrix.org/_matrix/client/v3/publicRooms?server=action%3Aadd-new-server
    at checkResponseStatus (/app/server/lib/fetch-endpoint.js:21:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchEndpoint (/app/server/lib/fetch-endpoint.js:44:3)
    at async fetchEndpointAsJson (/app/server/lib/fetch-endpoint.js:69:15)
    at async fetchPublicRooms (/app/server/lib/matrix-utils/fetch-public-rooms.js:29:36)
    at async /app/server/tracing/trace-utilities.js:31:24
    at async /app/server/routes/room-directory-routes.js:52:62

The error occured [sic] with these search parameters:

{
  "homeserver": "action:add-new-server",
  "searchTerm": "archive",
  "limit": 9
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-room-directoryRoom directory landing page where you can explore the list of roomsT-DefectSomething isn't working. Bugs, crashes, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions