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

Closed
opened 2008-01-13 23:02:33 +00:00 by nejucomo · 3 comments

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.)

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.)
nejucomo added the
code-frontend
major
defect
0.7.0
labels 2008-01-13 23:02:33 +00:00
nejucomo added this to the eventually milestone 2008-01-13 23:02:33 +00:00
Author

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::" 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.

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.
davidsarah commented 2010-02-02 02:44:18 +00:00
Owner

Duplicate of .

Duplicate of #884.
tahoe-lafs added the
duplicate
label 2010-02-02 02:44:18 +00:00
davidsarah closed this issue 2010-02-02 02:44:18 +00:00
davidsarah commented 2010-02-02 02:50:37 +00:00
Owner

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 (), but since there's no stack trace, this ticket is technically fixed by 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.
tahoe-lafs modified the milestone from eventually to 1.6.0 2010-02-02 02:50:37 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#274
No description provided.