fix(memory): return 200 with null data when memory key not found on GET#4421
fix(memory): return 200 with null data when memory key not found on GET#4421waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Adds a Reviewed by Cursor Bugbot for commit 840b9dc. Configure here. |
Greptile SummaryThis PR fixes a regression introduced in #4415 where the Confidence Score: 5/5Safe to merge — targeted, well-reasoned single-line fix with a new regression test. The change is minimal and correct: the GET handler now returns HTTP 200 with null data instead of 404 for missing keys, which allows transformResponse (guarded by if (!memory)) to return the expected empty-memories shape. DELETE and PUT correctly retain 404. The new test directly exercises the null-data path. No P0 or P1 findings. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor
participant MemoryRoute as GET /api/memory/[id]
participant DB
Executor->>MemoryRoute: GET request for memory key
MemoryRoute->>DB: SELECT WHERE key matches, deletedAt IS NULL
DB-->>MemoryRoute: empty result set
note over MemoryRoute: Before fix
MemoryRoute-->>Executor: 404 Memory not found
Executor->>Executor: throws — transformResponse never called
note over MemoryRoute: After fix
MemoryRoute-->>Executor: 200 with null data
Executor->>Executor: calls transformResponse
Executor-->>Executor: returns empty memories array
Reviews (2): Last reviewed commit: "test(memory): add null-data path test fo..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 840b9dc. Configure here.
Summary
Type of Change
Testing
Tested by tracing executor flow through `executeToolRequest` — non-2xx responses throw before `transformResponse`, 200+null flows through correctly.
Checklist