Skip to main content

Retrieve info from server request returning 500 error

Comments

1 comment

  • Permanently deleted user

    UPDATE

     

    got it in the end.

    set the exception raised by the 'try/catch activity' as a 'webexception '

    this allows you to call the exception object for 'reponse', which is a webreponse object.

    webreponse offers readresponsestream method, returning a memorystream object,

    and you can cast this to string using:

    Encoding.ASCII.GetString( memoryStream1.ToArray())  (encoding is in system.text, which you may need to import)

    which returns my JSON as a string from the exception, which I can then parse in a dictionary. (see another post)

    (note: for some reason I couldn't cast the response stream to a streamreader, which seems to be the usual way, but this works for me.)

     

    0

Please sign in to leave a comment.