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
Did you consider to use a!isnullorempty() instead of isnull()? This is the more modern approach and manages more of the edge cases.
Yes Stefan Helzle ,
I did try and the result was same. I don't see anywhere documented that Appian will create a document by itself and upload it if no document was passed in the body.
Also, I don't see where "Untitled document from web API.txt" part is being handled in the webAPI.
Can you post the full HTTP request you send to Appian?
Need to see the body . Null or empty also gives false for empty array .If your body coming as a empty array it will go for true statement in that if condition