Skip to content

Commit 86d309c

Browse files
committed
Merge branch 'feature/ignore-server-errors-on-getting-suggestions' into develop
2 parents 024b2c7 + 2e87fc1 commit 86d309c

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Core/Sources/Logger/Logger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public final class Logger {
3333
}
3434

3535
let osLog = OSLog(subsystem: subsystem, category: category)
36-
os_log("%@", log: osLog, type: osLogType, message as CVarArg)
36+
os_log("%{public}@", log: osLog, type: osLogType, message as CVarArg)
3737
}
3838

3939
public func debug(_ message: String) {

Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import OpenAIService
77
import SuggestionInjector
88
import SuggestionWidget
99
import XPCShared
10+
import LanguageServerProtocol
1011

1112
@ServiceActor
1213
struct WindowBaseCommandHandler: SuggestionCommandHandler {
@@ -18,6 +19,8 @@ struct WindowBaseCommandHandler: SuggestionCommandHandler {
1819
Task {
1920
do {
2021
try await _presentSuggestions(editor: editor)
22+
} catch let error as ServerError {
23+
Logger.service.error(error)
2124
} catch {
2225
presenter.presentError(error)
2326
Logger.service.error(error)

0 commit comments

Comments
 (0)