achievements-app / achievements-app/psn-api
makeUniversalSearch Unexpected token
- 主要語言
- TypeScript
- 星號
- 422
- 分支
- 56
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I am not able to use makeUniversalSearch.
`Authenticating with PSN via NPSSO...
Authentication successful.
Error during user search for 'USERNAME': SyntaxError: Unexpected token '<', ")
at parseJSONFromBytes (node:internal/deps/undici/undici:6251:19)
at successSteps (node:internal/deps/undici/undici:6232:27)
at readAllBytes (node:internal/deps/undici/undici:5201:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)`
The error occurs if I use makeUniversalSearch only.
貢獻指南
研究方向
Start from the `makeUniversalSearch` implementation in the TypeScript source and trace the request/response flow to the JSON parsing step shown in the stack trace. Reproduce with an NPSSO-authenticated username search to verify whether this endpoint is returning HTML. Then compare parsing and error-handling in nearby search methods for consistent behavior. Done means `makeUniversalSearch` safely handles this response shape and no longer crashes with `Unexpected token '<'`.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- node.js, typescript
- 領域
- api
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100