Skip to content

Commit 0aaf9a9

Browse files
committed
Check each error type usage in tests
1 parent 86486d9 commit 0aaf9a9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/languages/swift-client/Tests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class Tests: XCTestCase {
9292

9393
do {
9494
try await general.error400()
95-
} catch {
96-
print(error.localizedDescription)
95+
} catch let error as AppwriteError {
96+
print(error.message)
9797
}
9898

9999
do {
@@ -105,7 +105,7 @@ class Tests: XCTestCase {
105105
do {
106106
try await general.error502()
107107
} catch {
108-
print(error.localizedDescription)
108+
print(String(describing: error))
109109
}
110110

111111
wait(for: [expectation], timeout: 10.0)

tests/languages/swift-server/Tests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class Tests: XCTestCase {
8282

8383
do {
8484
try await general.error400()
85-
} catch {
86-
print(error.localizedDescription)
85+
} catch let error as AppwriteError {
86+
print(error.message)
8787
}
8888

8989
do {
@@ -95,7 +95,7 @@ class Tests: XCTestCase {
9595
do {
9696
try await general.error502()
9797
} catch {
98-
print(error.localizedDescription)
98+
print(String(describing: error))
9999
}
100100
}
101101
}

0 commit comments

Comments
 (0)