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:
@@ -51,7 +51,7 @@ class APIService {
|
|||||||
guard !newToken.isEmpty else { throw APIError.unauthorized }
|
guard !newToken.isEmpty else { throw APIError.unauthorized }
|
||||||
await MainActor.run { auth.updateTokens(accessToken: newToken, refreshToken: refreshResp.refreshToken) }
|
await MainActor.run { auth.updateTokens(accessToken: newToken, refreshToken: refreshResp.refreshToken) }
|
||||||
// Retry original request with new token
|
// 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)
|
let (retryData, retryResp) = try await URLSession.shared.data(for: retryReq)
|
||||||
guard let retryHttp = retryResp as? HTTPURLResponse else { throw APIError.networkError("Нет ответа") }
|
guard let retryHttp = retryResp as? HTTPURLResponse else { throw APIError.networkError("Нет ответа") }
|
||||||
if retryHttp.statusCode == 401 { throw APIError.unauthorized }
|
if retryHttp.statusCode == 401 { throw APIError.unauthorized }
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ targets:
|
|||||||
DEVELOPMENT_TEAM: V9AG8JTFLC
|
DEVELOPMENT_TEAM: V9AG8JTFLC
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
||||||
capabilities:
|
capabilities:
|
||||||
HealthKit: true
|
|
||||||
BackgroundModes:
|
BackgroundModes:
|
||||||
modes:
|
modes:
|
||||||
- processing
|
- processing
|
||||||
|
|||||||
Reference in New Issue
Block a user