ENG-1909 Add no-op Next.js content upsert endpoint#1220
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
4cd8e3f to
7fc6f80
Compare
7fc6f80 to
d43d61e
Compare
1127f9a to
284254a
Compare
615145c to
9445331
Compare
9445331 to
856b6fc
Compare
d73869a to
477c3be
Compare
| }); | ||
| return createApiResponse(request, result); | ||
| } catch (e: unknown) { | ||
| return handleRouteError(request, e, "/api/supabase/space/[id]/content"); |
There was a problem hiding this comment.
The error handler path /api/supabase/space/[id]/content does not match the actual endpoint path /api/internal/space/[id]/content based on the file location. This inconsistency could cause issues with error logging, tracking, and debugging in production.
return handleRouteError(request, e, "/api/internal/space/[id]/content");| return handleRouteError(request, e, "/api/supabase/space/[id]/content"); | |
| return handleRouteError(request, e, "/api/internal/space/[id]/content"); |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
|
My understanding from the last meeting is that this PR is cancelled. I'll move it to draft for now in case that was incorrect. |
|
That is correct. |
https://linear.app/discourse-graphs/issue/ENG-1909/add-no-op-nextjs-content-upsert-endpoint
Content upsert, based on cross-app types.
This introduces a StandaloneCrossAppContent type for upserting contents outside of concepts, following existing sync functions.
Rationale : This is the closest to the current upsert_content practices, since the upsert unification (eng-1824) has been delayed. So it should make eng-1911 as easy as possible.
There is an alternative approach: Do not create StandaloneCrossAppContent, but send the CrossAppNode with the standalone contents; and extract just the contents in the endpoint. In the longer run that is the right approach; but it is only optimal if we are doing the unification of upsert_content and upsert_concepts at the same time, which goes against PR minimalism. But I'm happy to revisit.
Also: I have not, in this PR, introduced a bulk conversion utility function, which could be more optimal in some cases. I think it is worth doing, but clearly a separate scope.
https://www.loom.com/share/202c49deb3014d2e8f60632f38ff71b4