RemoveRoom request returns 500 error when incorrect Room UniqueId is provided

Brief description

Calling PlayerResolver.RemoveRoom() with room.Id rather than room.UniqueId consistently produces an HTTP 500 error.

Note: the documentation states using UniqueId, but if you don’t follow the instructions correctly the result from the API is potentially confusing.

Details and error message(s)

Request failure, StatusCode: 500

Expected behaviour

The HTTP API should most likely return 4000 or a similar 4xx error when and invalid value is provided.

How to reproduce

Every time

Steps:

  1. Create a room
  2. Send a request to delete the room but provide an invalid value for UniqueId (such as room.Id).

Environment

SDK: v0.10.9
Engine:
Unity: 2020.3.46f1
OS/Platform: Windows

Typo correction:

The HTTP API should most likely return 400 or a similar 4xx error when and invalid value is provided.

An issue has been created to address this - thanks for the heads up.

Hi Kevin

Thanks again for reporting this issue.

This should be fixed now, and the API will respond with a 4xx status code and an error code in the response body for the following cases:

  • Not existing room id
    Status: 404
    Error Code: ERR_ROOMS_NOT_FOUND
  • Missing room secret
    Status: 400
    Error Code: ERR_ROOMS_INVALID_SECRET
  • Invalid room secret
    Status: 401
    Error Code: ERR_ROOMS_INVALID_SECRET