Bug 40337 - Improve error reporting for invalid accounts
Summary: Improve error reporting for invalid accounts
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/wj...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-08-24 00:23 UTC by Will Thompson
Modified: 2011-08-25 04:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2011-08-24 00:23:19 UTC
On the mailing list, Christophe-Marie Duquesne wrote:

> What do you do to add a gtalk account? I am stuck with:
> 
> mc-tool add gabble/jabber myuser@gmail.com string:password=mypassword
> 
> Whatever I do, I always end with the same error
> mc-tool: The supplied CM parameters were not valid
> (which is apparently not a message from mc-tool.c)

The message comes from MC itself. As I remarked on the list, this is a particularly unhelpful message, given that MC knows perfectly well which parameter(s) were invalid. I have the beginnings of a branch to fix this.
Comment 1 Will Thompson 2011-08-25 03:31:38 UTC
Here's a branch that took much longer than I expected (as is typical).

 src/mcd-account-manager.c               |   61 ++++++++---------
 src/mcd-account-manager.h               |    9 ---
 src/mcd-account.c                       |  108 ++++++++++++++++++++-----------
 src/mcd-account.h                       |    2 +-
 tests/twisted/account-manager/bad-cm.py |   20 +++---
 5 files changed, 110 insertions(+), 90 deletions(-)
Comment 2 Jonny Lamb 2011-08-25 04:04:32 UTC
Looks good.
Comment 3 Jonny Lamb 2011-08-25 04:24:24 UTC
On the two new patches:

+ { "account": 12,
+ "password": "secrecy",
+ }, signature='sv')
...
+ assertContains("account", e.message)

I think perhaps choosing the "account" parameter as the one to break and then assert is in the message is a little too easy to break on the callback to CreateAccount, but whatever.

Looks fine otherwise.
Comment 4 Will Thompson 2011-08-25 04:47:04 UTC
Thanks; I made it break 'password' instead, and merged le branch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.