Skip to content

for JS users: check type of ttl argument, client constructor arguments at run time #649

@cprice404

Description

@cprice404

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions