I turned on debug for reviewboard which gave me the server error and
stack trace in the http response. The problem was that there are new
(at least new to me in alpha2) required fields in the draft/save API.
Once I added them to the http request, its all working again!

This is the error that was getting reported w/ debug on:
>>>Exception Type: MultiPartParserError at 
>>>/api/json/reviewrequests/2830/draft/save/
>>>Exception Value: Invalid content length: 0

On Feb 16, 5:57 pm, Christian Hammond <chip...@chipx86.com> wrote:
> Hi mary,
>
> The invalid_<fieldname> thing shouldn't be set, but that's probably not the
> bug. The code that set that has been there for a very long time.
>
> Can you get an error log from the server when there's a 500 error? It would
> help to find out what's actually causing this.
>
> It might also be worth upgrading to alpha 4 to see if the problem has since
> been fixed.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.review-board.org
> VMware, Inc. -http://www.vmware.com
>
>
>
> On Mon, Feb 16, 2009 at 5:41 PM, mary <ciaom...@gmail.com> wrote:
>
> > Since upgrading to Alpha2 the JSON API for updating a reviewrequest
> > field is broken for us. (This was definitely working with earlier
> > code.) The API is successfully saving the new draft with the updated
> > field setting, however it appears to be setting a new field
> > "invalid_<fieldname>"= null ??? If you then run the save draft API on
> > the review you get an "500 Internal Server Error" even though it does
> > successfully commit the change. Each field edit results in the same
> > behavior.
>
> > Did something change in the API that I need to account for?
>
> > Following is the HTTP dialog: (the arrows >>> indicate direction of
> > communication)
>
> > GET
> >https://reviewboard.ourdomain.company.com/api/json/reviewrequests/2830/
>
> > <<<
> > {
> >  "review_request" : {
> >    "repository" : {
> >      "tool" : "Perforce",
> >      "name" : "perforce.ourdomain.company.com:1666",
> >      "path" : "perforce.ourdomain.company.com:1666",
> >      "id" : 1
> >    },
> >    "last_updated" : "2009-02-16 17:25:38",
> >    "time_added" : "2009-02-13 16:09:47",
> >    "status" : "pending",
> >    "description" : "This is a test\n",
> >    "branch" : "",
> >    "changenum" : 614656,
> >    "summary" : "thisisatest",
> >    "public" : 1,
> >    "testing_done" : "",
> >    "target_groups" : [
> >    ],
> >    "id" : 2830,
> >    "target_people" : [
> >      {
> >        "email" : "m.n...@company.com",
> >        "url" : "\/users\/name\/",
> >        "fullname" : "My Name",
> >        "id" : 114,
> >        "username" : "name",
> >        "first_name" : "My",
> >        "last_name" : "Name"
> >      }
> >    ],
> >    "bugs_closed" : [
> >      55555
> >    ],
> >    "submitter" : {
> >      "email" : "m.n...@company.com",
> >      "url" : "\/users\/name\/",
> >      "fullname" : "My Name",
> >      "id" : 114,
> >      "username" : "name",
>
> >      "first_name" : "My",
> >      "last_name" : "Name"
> >    }
> >  },
> >  "stat" : "ok"
> > }
> > <<<
>
> > POST
> >https://reviewboard.ourdomain.company.com/api/json/reviewrequests/283...
>
> > <<<
> > {
> >  "draft" : {
> >    "last_updated" : "2009-02-16 17:26:10",
> >    "review_request" : {
> >      "repository" : {
> >        "tool" : "Perforce",
> >        "name" : "perforce.ourdomain.company.com:1666",
> >        "path" : "perforce.ourdomain.company.com:1666",
> >        "id" : 1
> >      },
> >      "last_updated" : "2009-02-16 17:25:38",
> >      "time_added" : "2009-02-13 16:09:47",
> >      "status" : "pending",
> >      "description" : "This is a test\n",
> >      "branch" : "",
> >      "changenum" : 614656,
> >      "summary" : "thisisatest",
> >      "public" : 1,
> >      "testing_done" : "",
> >      "target_groups" : [
> >      ],
> >      "id" : 2830,
> >      "target_people" : [
> >        {
> >          "email" : "m.n...@company.com",
> >          "url" : "\/users\/name\/",
> >          "fullname" : "My Name",
> >          "id" : 114,
> >          "username" : "name",
> >          "first_name" : "My",
> >          "last_name" : "Name"
> >        }
> >      ],
> >      "bugs_closed" : [
> >        55555
> >      ],
> >      "submitter" : {
> >        "email" : "m.n...@company.com",
> >        "url" : "\/users\/name\/",
> >        "fullname" : "My Name",
> >        "id" : 114,
> >        "username" : "name",
> >        "first_name" : "My",
> >        "last_name" : "Name"
> >      }
> >    },
> >    "description" : "This is a test\n",
> >    "branch" : "",
> >    "summary" : "thisisatest",
> >    "testing_done" : "",
> >    "id" : 5039,
> >    "target_groups" : [
> >    ],
> >    "target_people" : [
> >      {
> >        "email" : "m.n...@company.com",
> >        "url" : "\/users\/name\/",
> >        "fullname" : "My Name",
> >        "id" : 114,
> >        "username" : "name",
> >        "first_name" : "My",
> >        "last_name" : "Name"
> >      }
> >    ],
> >    "bugs_closed" : [
> >      55555
> >    ]
> >  },
> >  "invalid_summary" : null,
> >  "stat" : "ok"
> > }
> > <<<
>
> > Save draft...
> > Error: server returned error 500 (Internal Server Error)
>
> > ***
> > Notice above the "invalid_summary" : null. ? I think that indicates
> > the core of the problem?- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to reviewboard@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to