0

Exception Codes for leagues


Hi, when a use queried the games they are in they got back the following exception codes instead of game/league details.  Is there any documentation on what these error codes represent, or under what circumstances they would be returned?

<fantasy_content xml:lang="en-US" yahoo:uri="http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games/leagues/settings" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" time="77.528953552246ms" copyright="Data provided by Yahoo! and STATS, LLC" xmlns="http://fantasysports.yahooapis.com/fantasy/v2/base.rng"> &lt;users count="1"> &lt;user> &lt;guid>WKP6NTS6X7GB3ARJHTFKERH6CU</guid> &lt;games count="0"> &lt;exceptions> &lt;exception> &lt;key>107</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>138</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>159</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>178</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>205</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>228</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>241</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>246</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;exception> &lt;key>261</key> &lt;message>Invalid subresource &amp;quot;leagues&quot; requested</message> &lt;/exception> &lt;/exceptions> &lt;/games> &lt;/user> &lt;/users> &lt;/fantasy_content>

Thanks,
Greg

by
0 Replies
  • We just recently added the exception stuff to handle the cases where you're interacting with heterogeneous collections of resources. For instance, an NFL game resource and a Tournament Pick'em game resource can behave similarly in many ways, but asking for a leagues collection beneath the Tournament Pick'em game resource wouldn't make any sense because there's no such thing as leagues in Tournament Pick'em. It's in those sorts of cases where we're trying to throw recoverable exceptions, where we just note that there was a problem in the <exceptions> block, instead of just killing the request entirely, which is what we would have done previously.

    Basically, if you see that, you should just interpret it to mean that you're trying to get data that doesn't make any sense, but we're still doing our best to give you something reasonable. For instance, in your request, you're checking on a user who's played the following games:

    107: Premiership in 2004
    138: Premiership in 2005
    159: Premiership in 2006
    178: Premiership in 2007
    205: Premiership in 2008
    228: Premiership in 2009
    241: World Cup in 2010
    246: Premiership in 2010
    261: Premiership in 2011

    My goodness, that's a lot of soccer. But the general idea is that none of these games support asking for "leagues". In fact, none of these games are currently supported by the webservices, as we've only really gotten the draft & trade games (NFL, MLB, NHL, and NBA) and Tournament Pick'em enabled so far.
    0

Recent Posts

in Fantasy Sports API