Page MenuHomePhabricator

API: Inconsistent response for empty collections
Closed, ResolvedPublic


Make this query (or similar):

When collection with id 150 is empty I get a [] in my response
When it's not I get
{"query":{"pages":{"6":{"pageid":6,"ns":0,"title":"Albert Einstein","thumbnail":{"source":"http://localhost:8888/w/images/thumb/3/3e/Einstein_1921_by_F_Schmutzer_-_restoration.jpg/91px-Einstein_1921_by_F_Schmutzer_-_restoration.jpg","width":91,"height":120}}}}}

Please be consistent and always return an array or an object.

Event Timeline

Jdlrobson assigned this task to Yurik.
Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task to In Analysis on the Gather Sprint Enwiki board.
Jdlrobson added a subscriber: Jdlrobson.
Jdlrobson renamed this task from API: Inconsistnet response for empty collections to API: Inconsistent response for empty collections.Apr 16 2015, 5:45 PM
Jdlrobson removed Yurik as the assignee of this task.
Jdlrobson edited a custom field.