Skip to content

Commit 2af330b

Browse files
committed
Add UserToken debug info
1 parent f30867a commit 2af330b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/AlgoliaSearchClient/Models/Common/UserToken.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public struct UserToken: StringWrapper, URLEncodable {
1515

1616
public init(rawValue: String) {
1717
assert(!rawValue.isEmpty, "UserToken can't be empty")
18-
assert(rawValue.count <= 64, "UserToken length can't be superior to 64 characters.")
18+
assert(rawValue.count <= 64, "UserToken length can't be superior to 64 characters. Input: \(rawValue)")
1919
let containsOnlyAllowedCharacters = rawValue.trimmingCharacters(in: allowedCharacters).isEmpty
20-
assert(containsOnlyAllowedCharacters, "UserToken allows only characters of type [a-zA-Z0-9_-]")
20+
assert(containsOnlyAllowedCharacters, "UserToken allows only characters of type [a-zA-Z0-9_-]. Input: \(rawValue)")
2121
self.rawValue = rawValue
2222
}
2323

0 commit comments

Comments
 (0)