{"comment":{"url":"https://api.github.com/repos/miguelportilla/rippled/comments/10988432","html_url":"https://github.com/miguelportilla/rippled/commit/ba28d305add440a15a57e8b9aa5452b0547971dc#commitcomment-10988432","id":10988432,"user":{"login":"rec","id":253362,"avatar_url":"https://avatars.githubusercontent.com/u/253362?v=3","gravatar_id":"","url":"https://api.github.com/users/rec","html_url":"https://github.com/rec","followers_url":"https://api.github.com/users/rec/followers","following_url":"https://api.github.com/users/rec/following{/other_user}","gists_url":"https://api.github.com/users/rec/gists{/gist_id}","starred_url":"https://api.github.com/users/rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rec/subscriptions","organizations_url":"https://api.github.com/users/rec/orgs","repos_url":"https://api.github.com/users/rec/repos","events_url":"https://api.github.com/users/rec/events{/privacy}","received_events_url":"https://api.github.com/users/rec/received_events","type":"User","site_admin":false},"position":110,"line":122,"path":"src/ripple/rpc/handlers/AccountObjects.cpp","commit_id":"ba28d305add440a15a57e8b9aa5452b0547971dc","created_at":"2015-04-30T16:25:36Z","updated_at":"2015-04-30T16:25:36Z","body":"You're basically returning the same error each time!\r\n\r\nWhy not this code snippet:\r\n    \r\n    uint256 dirIndex;\r\n    uint256 entryIndex;\r\n    auto hasMarker = params.isMember (jss::marker);\r\n    if (hasMarker)\r\n    {\r\n        auto const& marker = params[jss::marker];\r\n        if (! marker.isString ())\r\n            return RPC::expected_field_error (jss::marker, \"string\");\r\n        \r\n        std::stringstream ss (marker.asString ());\r\n        std::string s;\r\n        if (! (std::getline(ss, s, ',') &&\r\n               dirIndex.SetHex (s) && \r\n               std::getline (ss, s, ',') &&\r\n               entryIndex.SetHex (s)))\r\n            return RPC::invalid_field_error (jss::marker);\r\n    }\r\n    if (! context.netOps.getAccountObjects (\r\n            ledger, raAccount.getAccountID (),\r\n            type, dirIndex, entryIndex, limit, result) )\r\n    {\r\n        // report error for both paths, perhaps using hasMarker.\r\n    }\r\n\r\n"}}