Is your process started from your API? If yes, then make sure that your process doesn’t contain asynchronous executed code (Neither asyncAfter nor asyncBefore of service task(s) is ticked) and no wait state activities are available.
First: If I receive an infrastructre error, I need to try again using time cycle if all tried was without success then open an incident. Example: 500 from api call
Second: If I receive a body with empty list from api call, I need throw an exception to return to my api and finish whole process without open an incident. Example: business exception, list empty, user name wrong etc…
Whenever you throw an engine exception from within your code, it is considered as a problem needs to be resolved and you can control the automatic retry by setting a retry time cycle for the service task. The incident will be created only once all automatic retries as per the configuration are consumed with no success.
You can attach a boundary error event to the service task to model the logic in case of business error. You can throw the BPMNError from within your code based on your needs.