Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript SDK: Calling an undefined JS API method should trigger a useful error message to help users locate the issue quickly #10175

Closed
mattab opened this issue May 23, 2016 · 1 comment
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mattab
Copy link
Member

mattab commented May 23, 2016

Example to reproduce:

  • Call in the browser console _paq.push(['hello', '//demo3.piwik.org/piwik.php', 1]);
  • Got: JavaScript error in the browser console: TypeError: z[Y][ab] is undefined https://demo.piwik.org/piwik.js Line 22
  • Expected: a useful error message in browser console such as `The method 'hello' does not exist in Piwik Tracker. See the list of methods at: http://developer.piwik.org/api-reference/tracking-javascript
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label May 23, 2016
@mattab mattab added this to the 2.16.2 milestone May 23, 2016
@mattab mattab self-assigned this May 23, 2016
@tsteur
Copy link
Member

tsteur commented May 23, 2016

It should still be an error and the same exception. The exception message can be maybe enriched or something but it should still trigger an error. This is important for developers for debugging and for noticing that there actually is an error etc.

@mattab mattab changed the title JavaScript SDK: Calling an undefined JS API method should not trigger an error in the console, but a useful error message JavaScript SDK: Calling an undefined JS API method should trigger a useful error message to help users locate the issue quickly Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants