@Bastiaan Rodenburg,
Thank you for your response. The thing is - Yes. There is a reference to a generic error handling service (from another project), which I am calling via HTTP. But that doesn't seem to be the issue (at least not so far). So, what I did was - I manually created the service in another environment. But the issue still persisted. Upon several trial and errors, it was found that there was a DISABLED sequence (which I was using for debugging purpose) which might have been causing the issue. Now, I am not too sure about that. But when I deleted that step and then tried exporting, it worked.
Imagine things working well in lower environment. And when you go for the go-live, you have to manually redo the code in prod itself just because the project's state is inconsistent. Not a good thing, in my view.
To be honest, it is very difficult to get the root cause of issues like these. Feels like as a developer, I do not have much control of the things. I feel On-prem designer is great in this regard.
Anyway, would have been great, if there could be a detailed analysis on such issues. :)
Thanks,
Atul Kumar Jha