fix: missing try on makeRequest, remove HealthKit capability from project.yml

- Add missing try to makeRequest call on retry path (line 54)
- Remove HealthKit from xcodegen capabilities (adds Verifiable Health Records
  which personal teams don't support). HealthKit works via entitlements file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 14:12:43 +03:00
parent 44c759c190
commit d7d3eec2e5
2 changed files with 1 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ class APIService {
guard !newToken.isEmpty else { throw APIError.unauthorized }
await MainActor.run { auth.updateTokens(accessToken: newToken, refreshToken: refreshResp.refreshToken) }
// Retry original request with new token
let retryReq = makeRequest(path, method: method, token: newToken, body: body)
let retryReq = try makeRequest(path, method: method, token: newToken, body: body)
let (retryData, retryResp) = try await URLSession.shared.data(for: retryReq)
guard let retryHttp = retryResp as? HTTPURLResponse else { throw APIError.networkError("Нет ответа") }
if retryHttp.statusCode == 401 { throw APIError.unauthorized }