I have a requirement where user can pass document and it gets uploaded to an Appian's folder. I have created a WebAPI (Document Upload) and positive scenario is working as expected.
For Negative Scenario (When we are not passing any document):
1. In the WebAPI , it is handled as "400- Document not provided" but when testing we are getting status-200 (Untitled document from web API.txt).
Q. From where we are getting this "Untitled document from web API.txt" document. Where is it handled?
Q. How to fix default handling?
Discussion posts and replies are publicly visible
In negative scenario what's the value of local!success is it really giving you false?? I doubt that Can you check it once, It went for true statement in if condition that means it's true to start with. So try adding one more condition like checking length of the array etc.,
Thanks venkat Avuluri ,
I don't see any option to see local!success . However, I did fixed it by checking the size of the request.body.
I am just trying to figure out Appian is not taking the body as empty and from where "Untitled document from web API.txt" is being handled?
Sharing test-results from Postman
"
Puru Gope said: is not taking the body as empty
Empty Array returns false (Documented ) https://docs.appian.com/suite/help/24.4/fnc_informational_isnull.html .
Puru Gope said: from where "Untitled document from web API.txt" is being handled?
And coming to this it's taking true in if statement and trying to creating a Document for Empty values