Skip to content

BUG: get headends command returns error for empty list #2

@cwchapma

Description

@cwchapma

I think "get headends" should return an empty list instead of an error when there are no headends in the requested list.

Here is what I'm sending:

Request:  {"randhash":"xxx","request":null,"object":"headends","action":"get","api":20130502}
Response: {"response":"OK","code":200,"serverID":"AWS-micro.1","datetime":"2013-05-03T21:04:51Z","data":[{"headend":"0005410","name":"Rogers Cable Inc.","location":"Ottawa"}]}

Request:  {"randhash":"xxx","request":"0005410","object":"headends","action":"delete","api":20130502}
Response: {"response":"OK","code":200,"serverID":"AWS-micro.1","message":"Deleted headend.","changesRemaining":251,"datetime":"2013-05-03T21:04:51Z"}

Request:  {"randhash":"xxx","request":null,"object":"headends","action":"get","api":20130502}
Response: {"response":"ERROR","code":403,"datetime":"2013-05-03T21:04:51Z","message":"No headends configured for this account."}

You'll notice in the last request because I've deleted all the headends, it's giving me an error "No headends configured for this account.". Instead, I think it should be:

Request:  {"randhash":"xxx","request":null,"object":"headends","action":"get","api":20130502}
Response: {"response":"OK","code":200,"serverID":"AWS-micro.1","datetime":"2013-05-03T21:04:51Z","data":[]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions