Letractively / dotnetkicks

Automatically exported from code.google.com/p/dotnetkicks
1 stars 0 forks source link

getUserKickedStories for unknown user returns NullReferenceException #147

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to the API test page: 
http://www.dotnetkicks.com/services/json/jsonservices.ashx?test
2. Select getUserKickedStories from the methods drop-down.
3. In the request parameters box, type: { "username" : '123'}

What is the expected output? 
A successful response that returns an empty array for stories. Something 
like:
{"total":0,"timeStamp":"2007-10-04T23:53:48.2806033+01:00","items":[]}

What do you see instead?
{
    "id" : -1,
    "error" : {
        "name" : "JSONRPCError",
        "message" : "Object reference not set to an instance of an 
object.",
        "errors" : [ {
            "name" : "NullReferenceException",
            "message" : "Object reference not set to an instance of an 
object."
        } ]
    }
}

Original issue reported on code.google.com by azizatif on 4 Oct 2007 at 10:56

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 4 Oct 2007 at 10:57

GoogleCodeExporter commented 9 years ago
+1, if you want to batch this one together with issue 146...
Ps. you're not sleeping tonight? :D

Original comment by simone.b...@gmail.com on 5 Oct 2007 at 12:33

GoogleCodeExporter commented 9 years ago
This issue and issue #146 are really unrealted so I wouldn't batch them 
together as 
a single issue. They have different types (this one is a bug) and levels of 
importance (this one is more urgent).

P.S. These issues kept me awake. ;)

Original comment by azizatif on 5 Oct 2007 at 6:53

GoogleCodeExporter commented 9 years ago
Feel free to tackle them as you wish!

Original comment by simone.b...@gmail.com on 5 Oct 2007 at 8:41

GoogleCodeExporter commented 9 years ago
Thanks, I'll fix this.

Original comment by gavinjo...@gmail.com on 5 Oct 2007 at 8:48

GoogleCodeExporter commented 9 years ago
I have updated the API to throw an ArgumentException("Invalid Username") if the
username is invalid.

I've also updated the GetTaggedStories operation to return an empty list if a
non-existent tag is passed in.

Original comment by gavinjo...@gmail.com on 5 Oct 2007 at 9:45