GoogleChromeLabs / GoogleChromeLabs/comlink
More descriptive error when calling an undefined function.
Open
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

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
Assessment
This issue has not been assessed yet.