This ticket is intended to help improve error messaging for devs who are developing directly in JS as opposed to TS.
we have had some users hit an issue where they passed in the wrong ttl type (numeric vs CollectionTtl) for the different APIs. In the case where they pass in a CollectionTtl for a scalar API, the error message is very confusing and makes it seem like a server-side error. For dynamic languages we should probably do more validation to head off issues like this.
For now we should at least look at the error that happens in this case and do enough validation to give a better error.
In addition: if you pass the wrong names for the options arguments for the Client constructors, the constructor succeeds but then you can get a very confusing error at runtime. See: #919 . We should validate the contructor args at runtime and throw a clear error message for JS users.