Skip to content

fix: use API.callJsonApi in speech-store loadSettings to prevent settings load error#1456

Open
gdeyoung wants to merge 1 commit intoagent0ai:mainfrom
gdeyoung:fix/speech-store-calljsonapi-v17
Open

fix: use API.callJsonApi in speech-store loadSettings to prevent settings load error#1456
gdeyoung wants to merge 1 commit intoagent0ai:mainfrom
gdeyoung:fix/speech-store-calljsonapi-v17

Conversation

@gdeyoung
Copy link
Copy Markdown
Contributor

@gdeyoung gdeyoung commented Apr 6, 2026

Fix: Speech Store Settings Load Error

Problem

The loadSettings() method in speech-store.js uses raw fetchApi() which does not handle token exchange or error responses properly, causing persistent console errors when speech settings fail to load.

Solution

Replace raw fetchApi() with the existing API.callJsonApi() wrapper which properly handles:

  • Request serialization
  • Error response handling
  • Extension hooks
  • Token exchange

Changes

  • Add import * as API from "/js/api.js" to speech-store.js
  • Replace raw fetchApi call in loadSettings() with API.callJsonApi("settings_get", null)

Testing

  • Change is minimal (2 lines)
  • Uses existing, well-tested API wrapper
  • No functional change to settings behavior

Related

…ings load error

The loadSettings() method used raw fetchApi() which does not handle
token exchange or error responses properly. The callJsonApi wrapper
handles serialization, error responses, and extension hooks correctly.

Fixes persistent console error on speech settings load.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant