#274 closed defect (duplicate)

Present a friendly error message for invalid caps, instead of a stack trace.

Reported by: nejucomo Owned by:
Priority: major Milestone: 1.6.0
Component: code-frontend Version: 0.7.0
Keywords: cap ui wui usability newurls error Cc:
Launchpad Bug:

Description

I just cut'n'pasted a cap but left of the last char.

The result was a stack trace. I had to dig around in the source and look up regular expressions to figure out why my paste didn't work.

This case should present a friendly error message in the wui that says: "The requested link has an incorrect format. If you pasted this from the clipboard, make sure you copied the entire link without extra line breaks."

Also, the wapi should return an "invalid cap" error code, so that extensions can report to their own users the problem.

(To test this behavior, just mangle a known-working cap.)

Change History (5)

comment:1 Changed at 2008-01-13T23:05:11Z by nejucomo

Bonus wishlist feature: Detect common cases, such as internal newlines or missing suffixes or prefixes and tell the user the specific problem.

For instance if there is no "URI:<type>:" string anywhere in the input, remind them that caps always include these strings. If there *is* such a substring, but the other fields are too short, suggest that they included whitespace (from "friendly" formatting) or chopped off the end.

comment:2 Changed at 2009-12-13T04:02:07Z by davidsarah

  • Keywords usability newurls added

comment:3 Changed at 2010-01-16T01:09:36Z by davidsarah

  • Keywords error added

comment:4 Changed at 2010-02-02T02:44:18Z by davidsarah

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #884.

comment:5 Changed at 2010-02-02T02:50:37Z by davidsarah

  • Milestone changed from eventually to 1.6.0

As of 1.6.0 the error is:

GET unknown URI type: can only do t=info and t=json, not t=.
Using a webapi server that supports a later version of Tahoe may help.

Obviously this could be improved further (#884), but since there's no stack trace, this ticket is technically fixed by 1.6.0.

Note: See TracTickets for help on using tickets.