GoogleChromeLabs / GoogleChromeLabs/comlink

More descriptive error when calling an undefined function.

Open
#407 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
12.8k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

If I try to call a function on the wrapped object, and that function is not defined on the exposed object, I get this opaque error

![](https://i.gyazo.com/3232ae6de2f9bb6499f6d902e83c6eb3.png)

This makes debugging difficult, because I don't know which function spawned this error. The stack trace is somewhat helpful, but it doesn't include the exact line of the problematic function call.

Perhaps there could be some toggleable, development only logging? Comlink is a bit magical, I think it'd be helpful if the library provided some debugging tools when users face common gotchas.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.