Consider using typed throws on methods that always throw ClientError/ServerError.
This will allow adopters to remove an extra } catch { that doesn't have clear purpose.
do {
_ = try await try await client.getGreeting(input: ...)
} catch as ClientError {
// This branch is always taken
} catch {
// This branch is never taken, we always throw ClientError
}
Similar on the server.
With typed throws, we'll be able to do:
do {
_ = try await try await client.getGreeting(input: ...)
} catch {
// This branch is always taken and error is statically known to be ClientError
}
Consider using typed throws on methods that always throw ClientError/ServerError.
This will allow adopters to remove an extra
} catch {that doesn't have clear purpose.Similar on the server.
With typed throws, we'll be able to do: