Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11513 closed enhancement (worksforme)

Improve error message on misconfiguration of default handler web module

Reported by: Olemis Lang <olemis+trac@…> 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 Olemis Lang <olemis+trac@…>, 10 years ago

Please review [bh:attachment:t749_r1571498_default_handler_error the original patch for Bloodhound].

comment:2 by Jun Omae, 10 years ago

Resolution: worksforme
Status: newclosed

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.

Last edited 10 years ago by Jun Omae (previous) (diff)

comment:3 by Ryan J Ollos, 10 years ago

Oh, sorry, I made a ticket in #11514 before also realizing this has been fixed.

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:4 by Ryan J Ollos, 10 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.

comment:5 by Olemis Lang <olemis+trac@…>, 10 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 .

in reply to:  2 comment:6 by Olemis Lang <olemis+trac@…>, 10 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:7 by Olemis Lang <olemis+trac@…>, 10 years ago

mercurial mirror , I mean .

comment:8 by Olemis Lang <olemis+trac@…>, 10 years ago

Nevermind . I found it on my own . FTR it's implemented in https://bitbucket.org/edgewall/trac/src/trunk/trac/config.py

in reply to:  2 ; comment:9 by Olemis Lang <olemis+trac@…>, 10 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 .

in reply to:  9 ; comment:10 by Jun Omae, 10 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.

in reply to:  5 comment:11 by Ryan J Ollos, 10 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.

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

in reply to:  10 ; comment:12 by Ryan J Ollos, 10 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.

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

in reply to:  12 comment:13 by Jun Omae, 10 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

     
    2424                return template, data, content_type
    2525
    2626            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():
    2829                req.redirect(req.href.login())
    2930
    3031            try:

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.