Loading ...
Sorry, an error occurred while loading the content.
 

JSON DataSource - Data Error

Expand Messages
  • Levi
    I seems that the the dataErrorEvent pretty much only lets you know that it could not parse the response. Am I correct in this assumption? Basically, I am
    Message 1 of 3 , Aug 21, 2008
      I seems that the the dataErrorEvent pretty much only lets you know
      that it could not parse the response. Am I correct in this
      assumption? Basically, I am using a ScriptService. When an exception
      gets thrown, it comes back like this:

      {Message,StackTrace,ExceptionType}

      Now, obviously the DataSource won't be able to parse this since my
      schema isn't setup like that. My question is, do I pretty much just
      have to subscribe to the responseEvent and check out the full response
      myself to detect any problems, and if there's problems handle them
      accordingly to figure out what went wrong?

      Thanks in advance.

      Levi
    • Levi
      I had overlooked that since I am calling the sendRequest method myself, I can just use the failure option in the oCallback object to check out the response
      Message 2 of 3 , Aug 21, 2008
        I had overlooked that since I am calling the sendRequest method
        myself, I can just use the "failure" option in the oCallback object to
        check out the response to retrieve my error information.

        --- In ydn-javascript@yahoogroups.com, "Levi" <skankwilsonite@...> wrote:
        >
        > I seems that the the dataErrorEvent pretty much only lets you know
        > that it could not parse the response. Am I correct in this
        > assumption? Basically, I am using a ScriptService. When an exception
        > gets thrown, it comes back like this:
        >
        > {Message,StackTrace,ExceptionType}
        >
        > Now, obviously the DataSource won't be able to parse this since my
        > schema isn't setup like that. My question is, do I pretty much just
        > have to subscribe to the responseEvent and check out the full response
        > myself to detect any problems, and if there's problems handle them
        > accordingly to figure out what went wrong?
        >
        > Thanks in advance.
        >
        > Levi
        >
      • Satyam
        Overriding DataSource s doBeforeParseData can help you detect this anomalous format and reformat it somehow that the code later on will be able to cope with
        Message 3 of 3 , Aug 23, 2008
          Overriding DataSource's doBeforeParseData can help you detect this
          anomalous format and reformat it somehow that the code later on will be
          able to cope with gracefully.

          Satyam


          Levi wrote:
          > I seems that the the dataErrorEvent pretty much only lets you know
          > that it could not parse the response. Am I correct in this
          > assumption? Basically, I am using a ScriptService. When an exception
          > gets thrown, it comes back like this:
          >
          > {Message,StackTrace,ExceptionType}
          >
          > Now, obviously the DataSource won't be able to parse this since my
          > schema isn't setup like that. My question is, do I pretty much just
          > have to subscribe to the responseEvent and check out the full response
          > myself to detect any problems, and if there's problems handle them
          > accordingly to figure out what went wrong?
          >
          > Thanks in advance.
          >
          > Levi
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - http://www.avg.com
          > Version: 8.0.138 / Virus Database: 270.6.6/1623 - Release Date: 20/08/2008 8:12
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.