#11513 closed enhancement (worksforme)
Improve error message on misconfiguration of default handler web module
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | |
Component: | general | Version: | 1.0.1 |
Severity: | trivial | Keywords: | configuration, bloodhound |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Backport the changes proposed in bh:ticket:749 consisting in raising a ConfigurationError
rather than AttributeError
on default handler misconfiguration . By doing so a more user-friendly error message will be displayed.
Attachments (0)
Change History (13)
comment:1 by , 11 years ago
follow-ups: 6 9 comment:2 by , 11 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:3 by , 11 years ago
Oh, sorry, I made a ticket in #11514 before also realizing this has been fixed.
comment:4 by , 11 years ago
Also the TracLink was just incorrect:
attachment:t749_r1571498_default_handler_error
→
bh:attachment:t749_r1571498_default_handler_error.diff:ticket:749
but in general I favor minimizing the references to Bloodhound in the Trac project. If there is a Bloodhound ticket or mailing list entry with relevant discussion then I can see adding a link back to that discussion, but if the ticket in Bloodhound is not relevant to the Trac developers then I don't think we need a reference.
And as Jun hinted at, having a ticket and patch in Bloodhound is not a substitute for a proper (i.e. fully descriptive) defect report in Trac.
follow-up: 11 comment:5 by , 11 years ago
So what is the recommended way to request for backporting something already proposed in Bloodhound and provide a hint to describe the solution ? Rewrite the same text written in BH ticket ?
p.s. my mistake for submitting with wrong patch name , sorry , I did not notice .
comment:6 by , 11 years ago
Replying to jomae:
After r12068 (#10285), it raises
ConfigurationError
.p.s. You should attach the patch in the ticket. The patch link via intertrac cannot be viewable without bloodhound account and viewing the link via intertrac raises Forbidden even if logged in.
Sorry about that but I can not see this behavior after pulling changes from bitbucket mirror (which I use for development and proposing patches) . Is it up-to-date ?
https://bitbucket.org/edgewall/trac/src/trunk/trac/web/main.py?at=trunk#cl-171
comment:8 by , 11 years ago
Nevermind . I found it on my own . FTR it's implemented in https://bitbucket.org/edgewall/trac/src/trunk/trac/config.py
follow-up: 10 comment:9 by , 11 years ago
Replying to jomae: […]
p.s. You should attach the patch in the ticket. The patch link via intertrac cannot be viewable without bloodhound account and viewing the link via intertrac raises Forbidden even if logged in.
Bloodhound issue tracker is public , this should not be an issue .
follow-up: 12 comment:10 by , 11 years ago
p.s. You should attach the patch in the ticket. The patch link via intertrac cannot be viewable without bloodhound account and viewing the link via intertrac raises Forbidden even if logged in.
Bloodhound issue tracker is public , this should not be an issue .
Okay. Please ignore what I said. However, Bloodhound currently requires authentication for intertrac with non-existent resource, e.g. bh:ticket:0, bh:log:0, bh:wiki:NotFound. I've confused.
comment:11 by , 11 years ago
Replying to Olemis Lang <olemis+trac@…>:
So what is the recommended way to request for backporting something already proposed in Bloodhound and provide a hint to describe the solution ? Rewrite the same text written in BH ticket ?
Reproduce the issue in Trac (in 0.12-stable, 1.0-stable or trunk, as appropriate in the context), provide a report that is specific for Trac, and attach a patch against the Trac source code.
follow-up: 13 comment:12 by , 11 years ago
Replying to jomae:
However, Bloodhound currently requires authentication for intertrac with non-existent resource, e.g. bh:ticket:0, bh:log:0, bh:wiki:NotFound. I've confused.
I think this is probably a case of the misleading error message, which has been recently reported in #11511, and is already fixed on 1.0-stable.
comment:13 by , 11 years ago
Replying to rjollos:
Replying to jomae:
However, Bloodhound currently requires authentication for intertrac with non-existent resource, e.g. bh:ticket:0, bh:log:0, bh:wiki:NotFound. I've confused.
I think this is probably a case of the misleading error message, which has been recently reported in #11511, and is already fixed on 1.0-stable.
I understand that th:PermRedirectPlugin redirects for PermissionError
which is wrongly raised by InterTrac with non-existent resource.
I think the plugin should redirect if only correct action
property of PermissionError
exception….
-
permredirect/filter.py
24 24 return template, data, content_type 25 25 26 26 exctype, exc = sys.exc_info()[0:2] 27 if issubclass(exctype, PermissionError): 27 if issubclass(exctype, PermissionError) and \ 28 exc.action and exc.action.isupper(): 28 29 req.redirect(req.href.login()) 29 30 30 31 try:
Please review [bh:attachment:t749_r1571498_default_handler_error the original patch for Bloodhound].