Summary
Three legacy .js utility files in autobot-frontend/src/utils/ were missed by the getApiBase() TypeScript sweep (#3629) because the original grep used --type ts. All three make real API/fetch calls with hardcoded /api/ paths.
Files to Fix
| File |
Occurrences |
Type |
src/utils/SecretsApiClient.js |
3 |
this.apiClient.post/get() calls |
src/utils/FrontendHealthMonitor.js |
1 |
fetch('/api/health', ...) |
src/utils/OptimizedHealthMonitor.js |
1 |
fetch('/api/system/health', ...) |
Do NOT change
src/utils/ApiClientMonitor.js — path strings in a monitoring descriptor map, not HTTP calls
src/utils/ApiEndpointMapper.js — path strings used as map keys/patterns
src/utils/ErrorHandler.js — message.includes('/api/prompts/') checks error message content, not a URL
Fix
In each file, add the import at the top and replace hardcoded paths:
import { getApiBase } from '@/config/ssot-config'
// SecretsApiClient.js
- this.apiClient.post('/api/secrets/', secretData)
+ this.apiClient.post(`${getApiBase()}/secrets/`, secretData)
// FrontendHealthMonitor.js
- fetch('/api/health', ...)
+ fetch(`${getApiBase()}/health`, ...)
// OptimizedHealthMonitor.js
- fetch('/api/system/health', ...)
+ fetch(`${getApiBase()}/system/health`, ...)
Verification
grep -n "'/api/" autobot-frontend/src/utils/SecretsApiClient.js \
autobot-frontend/src/utils/FrontendHealthMonitor.js \
autobot-frontend/src/utils/OptimizedHealthMonitor.js
# Should return 0 results
Discovered as gap during #3629 implementation (noted in PR body), 2026-04-07.
Summary
Three legacy
.jsutility files inautobot-frontend/src/utils/were missed by thegetApiBase()TypeScript sweep (#3629) because the original grep used--type ts. All three make real API/fetch calls with hardcoded/api/paths.Files to Fix
src/utils/SecretsApiClient.jsthis.apiClient.post/get()callssrc/utils/FrontendHealthMonitor.jsfetch('/api/health', ...)src/utils/OptimizedHealthMonitor.jsfetch('/api/system/health', ...)Do NOT change
src/utils/ApiClientMonitor.js— path strings in a monitoring descriptor map, not HTTP callssrc/utils/ApiEndpointMapper.js— path strings used as map keys/patternssrc/utils/ErrorHandler.js—message.includes('/api/prompts/')checks error message content, not a URLFix
In each file, add the import at the top and replace hardcoded paths:
Verification
Discovered as gap during #3629 implementation (noted in PR body), 2026-04-07.