Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API throws a whitelabel 500 error when a project is not found #1268

Closed
Jo0001 opened this issue Sep 6, 2023 · 1 comment · Fixed by #1266
Closed

API throws a whitelabel 500 error when a project is not found #1268

Jo0001 opened this issue Sep 6, 2023 · 1 comment · Fixed by #1266
Labels
1. api This issue/pr relates to an issue/change on the api 1. bug Something isn't working

Comments

@Jo0001
Copy link

Jo0001 commented Sep 6, 2023

Observed/problematic behavior

Plain HTML default error site:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Sep 06 09:04:21 GMT 2023
There was an unexpected error (type=Internal Server Error, status=500).

Expected behavior

Propper 4xx message as JSON like in the /user endpoint

Steps to reproduce

Send a request to the /projects endpoint with a invalid project e.g. with a space in the name like https://hangar.papermc.io/api/v1/projects/ViaVersion%20/versions or https://hangar.papermc.io/api/v1/projects/viaversion%20/members?limit=1&offset=0

On https://hangar.papermc.io/api/v1/projects/viaversion%20/ a 404 is returned but as also as a Whitelabel Error Page instead of a JSON message

Other

No response

@kennytv kennytv added 1. bug Something isn't working 1. api This issue/pr relates to an issue/change on the api labels Sep 6, 2023
@MiniDigger
Copy link
Member

Oh that one I might have fixed on my more tests branch already, since I noticed it when writing integration tests

MiniDigger added a commit that referenced this issue Sep 6, 2023
@MiniDigger MiniDigger linked a pull request Sep 6, 2023 that will close this issue
MiniDigger added a commit that referenced this issue Sep 16, 2023
* feat: start to build out a new integration test framework

* feat: start to build out a new integration test framework

* allow disabling rate limits + add tests for pages

* moar (also fixes #1268)

* disable tests for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. api This issue/pr relates to an issue/change on the api 1. bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants