[GH-ISSUE #2743] [Integration API] GET /site-resource/{siteResourceId} not working #4172

Open
opened 2026-04-20 08:38:31 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ninofaivre on GitHub (Mar 30, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/2743

Describe the Bug

As said in the title this route in the integration API is not working.
Here is the error I get with a 400 status :
'Validation error: Invalid input: expected string, received undefined at "siteId"; Invalid input: expected string, received undefined at "orgId"'
After taking a quick look at the code (even tho I have not done any ts and zod for a looooong time), I believe this bug is due to the zod schema expecting a siteId and an orgId but the route does not contains it.
So either the getSiteResource function should be working without it either the route needs to be updated with the correct path params.

Environment

I have been able to reproduce this bug in :

  • free tier pangolin.net hosted
  • self hosted v1.15.3 on NixOS

To Reproduce

Just create a site-resource, get its id via /org/{orgId}/site-resources and then try to get it via /site-resource/{siteResourceId}. I think this issue is very old because it is happening on my selfhosted v1.15.3 AND on the app.pangolin.net hosted free tier.

Expected Behavior

Should return me a site-resource.

Originally created by @ninofaivre on GitHub (Mar 30, 2026). Original GitHub issue: https://github.com/fosrl/pangolin/issues/2743 ### Describe the Bug As said in the title this route in the integration API is not working. Here is the error I get with a 400 status : `'Validation error: Invalid input: expected string, received undefined at "siteId"; Invalid input: expected string, received undefined at "orgId"'` After taking a quick look at the code (even tho I have not done any ts and zod for a looooong time), I believe this bug is due to [the zod schema](https://github.com/fosrl/pangolin/blob/main/server/routers/siteResource/getSiteResource.ts#L13) expecting a siteId and an orgId but [the route](https://github.com/fosrl/pangolin/blob/main/server/routers/external.ts#L312) does not contains it. So either the getSiteResource function should be working without it either the route needs to be updated with the correct path params. ### Environment I have been able to reproduce this bug in : * free tier pangolin.net hosted * self hosted v1.15.3 on NixOS ### To Reproduce Just create a site-resource, get its id via `/org/{orgId}/site-resources` and then try to get it via `/site-resource/{siteResourceId}`. I think this issue is very old because it is happening on my selfhosted v1.15.3 AND on the app.pangolin.net hosted free tier. ### Expected Behavior Should return me a site-resource.
GiteaMirror added the needs investigating label 2026-04-20 08:38:31 -05:00
Author
Owner

@prath47 commented on GitHub (Apr 1, 2026):

@LaurenceJJones I would like to work on this. Looks good first issue for me.

<!-- gh-comment-id:4173117754 --> @prath47 commented on GitHub (Apr 1, 2026): @LaurenceJJones I would like to work on this. Looks good first issue for me.
Author
Owner

@ninofaivre commented on GitHub (Apr 3, 2026):

/org/{orgId}/site/{siteId}/resource/nice/{niceId} seems to be broken too but in a different way, testing it with swagger I just get 404 (on the free hosted and self hosted)

Image
<!-- gh-comment-id:4181123222 --> @ninofaivre commented on GitHub (Apr 3, 2026): /org/{orgId}/site/{siteId}/resource/nice/{niceId} seems to be broken too but in a different way, testing it with swagger I just get 404 (on the free hosted and self hosted) <img width="969" height="508" alt="Image" src="https://github.com/user-attachments/assets/fad7ddc2-40b1-46ff-b950-e1782ea9b8f2" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#4172