modrinth / docs

Our documentation site's source code.

Home Page:https://docs.modrinth.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non existent projects return an empty page instead of an error

pbone64 opened this issue · comments

commented

Describe the bug
The Modrinth API spec says that trying to fetch a project with a non existent id or slug (say, api.modrinth.com/v2/project/thisisafakeslug) should return a JSON response such as the following:

{
  "error": "not_found",
  "description": "the requested route does not exist"
}

But it actually returns nothing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://api.modrinth.com/v2/project/thisisafakeslug
  2. See that no JSON is returned :(

Expected behavior
The JSON specified in the api spec would be returned.

Additional context
N/A

Not a bug, if it the documentation says that it should return an error when the project is not found, it's wrong. Feel free to make an issue there and we can get that fixed.

The backend returns a 404 Not Found with no body if an invalid project ID/slug is specified.

Resolved in 19c0290