First time here? Check out the FAQ!
2

AJAX responses sometimes don't work with 500 error due to exception
 

This isn't really a "question"… but I'm not sure where to file bugs as the Redmine instance wasn't allowing me to file anything.

Easy way to see this happen on 0.7.43: Add a comment, try to upvote it yourself. It happens in a few other places too, but this is easy to duplicate.

Instead of returning the error "You can't upvote your own comments" there is an HTTP 500 error. Looking at the backtrace, the problem is that the PermissionDenied exception does not have a "messages" variable. The hacky way to fix this (and what I'm using right now) is to change utils/decorators.py:90 to

            if isinstance(e, Exception) and hasattr(e, 'messages'):

I'm sure there's a better way, but this at least has fixed the issues so we don't have errors in production.

Thank you.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Andrew Wilcox's avatar
21
Andrew Wilcox
asked 12 years ago
Evgeny's avatar
13.2k
Evgeny
updated 12 years ago

Comments

see more comments

1 Answer

1

I think this is fixed in the repository. Take a look here.

Will be available in 0.7.44.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago
link

Comments

see more comments