Skip to content

Commit 780a30c

Browse files
committed
chore: reduce error verbosity
1 parent ea73a0a commit 780a30c

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Coder Desktop/Coder Desktop/Views/LoginForm.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ enum LoginError: Error {
201201
case .invalidURL:
202202
"Invalid URL"
203203
case let .failedAuth(err):
204-
"Could not authenticate with Coder deployment:\n\(err.description)"
204+
"Could not authenticate with Coder deployment:\n\(err.localizedDescription)"
205205
}
206206
}
207207

Coder Desktop/CoderSDK/Client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public enum ClientError: Error {
131131
case let .unexpectedResponse(data):
132132
"Unexpected or non HTTP response: \(data)"
133133
case let .encodeFailure(error):
134-
"Failed to encode body: \(error)"
134+
"Failed to encode body: \(error.localizedDescription)"
135135
}
136136
}
137137

Coder Desktop/VPN/Manager.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,17 @@ enum ManagerError: Error {
251251
var description: String {
252252
switch self {
253253
case let .download(err):
254-
"Download error: \(err)"
254+
"Download error: \(err.localizedDescription)"
255255
case let .tunnelSetup(err):
256-
"Tunnel setup error: \(err)"
256+
"Tunnel setup error: \(err.localizedDescription)"
257257
case let .handshake(err):
258-
"Handshake error: \(err)"
258+
"Handshake error: \(err.localizedDescription)"
259259
case let .validation(err):
260-
"Validation error: \(err)"
260+
"Validation error: \(err.localizedDescription)"
261261
case .incorrectResponse:
262262
"Received unexpected response over tunnel"
263263
case let .failedRPC(err):
264-
"Failed rpc: \(err)"
264+
"Failed rpc: \(err.localizedDescription)"
265265
case let .serverInfo(msg):
266266
msg
267267
case let .errorResponse(msg):
@@ -273,7 +273,7 @@ enum ManagerError: Error {
273273
case .permissionDenied:
274274
"Permission was not granted to execute the CoderVPN dylib"
275275
case let .tunnelFail(err):
276-
"Failed to communicate with dylib over tunnel: \(err)"
276+
"Failed to communicate with dylib over tunnel: \(err.localizedDescription)"
277277
}
278278
}
279279

Coder Desktop/VPN/TunnelHandle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ enum TunnelHandleError: Error {
7575

7676
var description: String {
7777
switch self {
78-
case let .pipe(err): "pipe error: \(err)"
78+
case let .pipe(err): "pipe error: \(err.localizedDescription)"
7979
case let .dylib(d): d
8080
case let .symbol(symbol, message): "\(symbol): \(message)"
8181
case let .openTunnel(error): "OpenTunnel: \(error.message)"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy