Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd15b6de

Browse files
committed
log on token check failure other than 401
1 parent92fd96b commitd15b6de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎Coder Desktop/Coder Desktop/State.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import CoderSDK
22
import Foundation
33
import KeychainAccess
44
import NetworkExtension
5+
import os
56
import SwiftUI
67

78
@MainActor
89
classAppState:ObservableObject{
10+
privateletlogger=Logger(subsystem:Bundle.main.bundleIdentifier!, category:"AppState")
911
letappId=Bundle.main.bundleIdentifier!
1012

1113
// Stored in UserDefaults
@@ -96,7 +98,7 @@ class AppState: ObservableObject {
9698
if hasSession{
9799
_sessionToken=Published(initialValue:keychainGet(for:Keys.sessionToken))
98100
if sessionToken==nil || sessionToken!.isEmpty==true{
99-
hasSession=false
101+
clearSession()
100102
}
101103
}
102104
}
@@ -120,6 +122,7 @@ class AppState: ObservableObject {
120122
}
121123
}catch{
122124
// Some other failure, we'll show an error if they try and do something
125+
logger.error("failed to check token validity:\(error)")
123126
return
124127
}
125128
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp