Hi everyone, I am trying to get the error response from an http request and then say if it returned this error then do another activity.

I have my response content variable already created and my url


HI @Anelisa_Bolosha

You can create a variable in the output properties on response status will return you the code and response content will give you the messsage

After getting you can use in if activity like

ResponceContent.Contains(“Error”) or responseStatus=200

Something like this


1 Like

Hi @Sudharsan_Ka ,thank you for your response,
yes I have output Response content created already, the ‘strJson’

So I have 404 and 101 error, so I need to specify the error,
so I can say ResponceContent.Contains(“404 Error”), like that?

strJson.contains(“404 Error”)

Or create a new variable in the Response status and it will be integer

You can also give condition like ResponseStatus =404


Thank you so much :grinning:

Hi there is another one here in the image above, so strJson is my http response variable, the response contains “lineOfBusinessSystem” string and the string needs to appear once if twice or more then I do another activity
Please assist on how I should write it in the IF statement.
There is also a value for that string:
I have declared that value as ‘LOB’(string )

So if that string appears more than once or that value then I do something else

made the condition like this but then it returned an error"

if: Value cannot be null (Parameter ‘source’)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.