3637: RB.ReviewRequestEditor.setDraftField() unhandled error during error handling

gregor*******@gmai***** (Google Code) (Is this you? Claim this profile.)
What version are you running?

2.0.10

What's the URL of the page containing the problem?

It's from a custom extension. But I'm pretty sure it's a bug in core.

What steps will reproduce the problem?
1. Call into RB.ReviewRequestEditor.setDraftField()
2. Raise a PublishError from the resource handler

What is the expected output? What do you see instead?

The error appears to be during the error handling in setDraftField() at https://github.com/reviewboard/reviewboard/blob/9b6f5a7dca96d27d7296cada55bd5609c8b10943/reviewboard/static/rb/js/models/reviewRequestEditorModel.js#L148. The JSON response has a .stat and .err property, but not .fields. Accessing the undefined property raises an uncaught TypeError and we lose the callback chain.
chipx86
#1 chipx86
  • +EasyFix
    +Project-ReviewBoard
    +Component-WebUI
#2 seanch******@gmai***** (Google Code) (Is this you? Claim this profile.)
I think I will try this...

Chen Sihang
#3 seanch******@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi, I've been working on this bug you have mentioned and I try some different ways to see if the bug there exists but I didn't have the same problem as you do. So would you mind try the version 2.0.12 and see if the same problem appears and provide me with more detailed information about how the problem raises, thanks a lot ^-^
#4 xul041
  • +xul041
#5 xul041

Can you show more details about extension? The PublishError from the resource handler should not be raised, it should be catched.

#6 xul041

The public error has already been handled at line 478. https://github.com/reviewboard/reviewboard/blob/master/reviewboard/webapi/resources/review_request_draft.py#L410
If the bug is still exist, please prove more details.

  • -New
    +NotABug
  • -xul041