labrinth icon indicating copy to clipboard operation
labrinth copied to clipboard

`GET /v2/projects` does not support certain symbols that `GET /v2/project/{id|slug}` supports

Open CCheukKa opened this issue 1 year ago • 0 comments

Describe the bug

If a slug contains certain symbols, GET /v2/projects does not return that project as if it doesn't exist despite GET /v2/project/{id|slug} supporting it without issue. HTML encoding can be used as a workaround.

So far, I have encountered this issue for +.

Steps to reproduce

I'll use Shulker+ as an example since that is where I first encountered the issue.

  1. Make a GET request to https://api.modrinth.com/v2/projects?ids=["shulker+"]
  • Response: []

Expected behaviour

The response should go through like usual. For reference, making a GET request to https://api.modrinth.com/v2/project/shulker+ yields a normal response.

Additional context

HTML encoding can be used as a workaround: https://api.modrinth.com/v2/projects?ids=["shulker%2B"], despite this not being necessary for GET /v2/project/{id|slug}.

CCheukKa avatar May 04 '24 08:05 CCheukKa