Skip to content

Commit 6a5ce15

Browse files
fix: return message from Web3Error.valueError
1 parent 8d2490b commit 6a5ce15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Core/Web3Error/Web3Error.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public enum Web3Error: LocalizedError {
5454
return "Server error: \(code)"
5555
case let .clientError(code: code):
5656
return "Client error: \(code)"
57-
case .valueError:
58-
return "You're passing value that doesn't supported by this method."
57+
case .valueError(let errorDescription):
58+
return (errorDescription?.isEmpty ?? true) ? "You're passing value that isn't supported by this method" : errorDescription!
5959
}
6060
}
6161
}

0 commit comments

Comments
 (0)