"Pipeline execution failed or was aborted" - proper design of async interface(?)

Hi SL gurus,

I designed an async pipeline, see picture.
I created an error pipeline and defined it in my async pipeline properties.
I created a triggered task for my async pipeline.

Now, to simulate an error, I put some trash into JSON Formatter.
Whenever calling this pipeline with postman I get:
“Pipeline execution failed or was aborted”

I would expect the async JSON answer, and whatever happens in the pipeline is handeled there. The JSON POST sender has clean response.

Instead, postman gets some garbage. It seems JSON async generator is not called on time.

So what is the proper design of async behaviour, so I do not get trash like this?
Yes, i went through this already:

thank you
Simon :slight_smile:

In this case it looks like your pipeline is failing before it can start, so the Async Generator is never getting started. Fix the pipeline so the pipeline can start, then introduce some data which causes the pipeline to fail.

@Szymon Which snap you are using “Delay async response” ? Is that router or Copy not sure, however to validate your pipeline during development, you can use mapper/json generator before “Delay async response snap” and copy the content whatever you are passing from Post Man as payload and validate your pipeline, once you get your expected response then remove the json generator/mapper snap.

Thanks for comments.
@cstewart hawk eye :wink: the pipeline obviously fails before pseude-async can execute. JSON formatter intentionally causes an error, as described. SInce the generator is before the formatter, I would assume, it would be executed first. It is clearly NOT the case.
@Supratim It is router with both ‘true’ routes. Thank you for your suggestion. Of course you can introduce some magical checks first, but this is exactly try-and-catch approach i want to avoid, since JSON is not schema-first approach.See scenario below…

Hence my query again:
what is the proper way to design an asynchronous behaviour.
What i mean by that is the following:
A sender POSTs a JSON message to SL.
SL pipeline.accepts the JSON payload, sends HTTP 200 back to the sender, indicating, it has taken the data.
Whatever happens with the data in the pipeline is SL’s business.

Simon :slight_smile: