1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Catching the body of the error with sendJSONRequest

Discussão em 'PSDN - Forum' iniciado por bakar, Fevereiro 18, 2015.

  1. bakar

    bakar Guest

    Hi,

    Normally the webservice sends an error message back. I can only catch the header. See example below the body of the error json message:

    [​IMG]

    Now i have another example with a 500 Internal Server Error. This occurs during the execution of the request. Most of the time these are validation errors. The body of the response contains the error information, for example:

    {
    "error": {
    "code": "",
    "message": {
    "lang": "",
    "value": "Can't delete: Account 58 - Used in: Administrations"
    }
    }
    }

    How can i catch the body of the error message? When working with the sendJSONRequest, I only get the header, see below the screenshots:

    This is the part of the object script trigger:

    [​IMG]


    And from the debug window:

    [​IMG]


    I have tried error.message.value and also e.error.message.value, but it looks like that I can not catch these information. Is that true?

    Continue reading...

Compartilhe esta Página