Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    12.0p Clientside issue when HttpProxy can't reach the remote server

    Hi Isomorphic,

    retesting this issue I noticed the data source switch in the sample code (v12.0p_2020-04-16).
    If you set it to true, you'll only see "Loading" in the client, while the request itself failed and you get no notification / popup, which I would expect.

    This is then in the response of the request in the Developer Console's RPC Tab:
    Code:
    [
        {
            response:{
                data:"Transport error - HTTP code: 500 for URL: http://ichart.finance.yahoo.com/table.csv (via proxy: https://www-demos.smartclient.com/smartclient-12.0/isomorphic/HttpProxy)",
                status:-91
            }
        }
    ]
    I think that there should also be some error message displayed client side.
    Also, I can't find the error code -91 in the BaseResponse part here (similar issue for other constant values reported here).

    Best regards
    Blama

    #2
    We're guessing by the "data source switch" you meant that there is a variable in the sample code that makes it try to fetch live from Yahoo?

    We are using previously captured data because Yahoo keeps capriciously changing how you are supposed to access this data and there is no real value, in this sample, to the data being live.

    For example, now you can't even resolve ichart.finance.yahoo.com. This is correctly reported as Unknown Host Error, code -91, and that is indeed documented.

    The error logic didn't work for this case because willHandleError wasn't set. We'll fix that, and also add a comment letting people know that Yahoo's API seems to be permanently gone.

    Comment


      #3
      Hi Isomorphic,

      yes that is what I meant. I can see the changes in the sample now (v12.0p_2020-04-18) and it's working now like you say.

      W.r.t. the error codes: Shouldn't both lists contain the same constants?
      Also, in the server docs there is twice:

      public static final int STATUS_UPDATE_WITHOUT_PK -9
      public static final int UPDATE_WITHOUT_PK -9

      Best regards
      Blama

      Comment


        #4
        One is a subclass with more error codes.

        Comment

        Working...
        X