Hello everyone,
I’ve hit a roadblock and I need some assistance. Basically, I was writing an API for importing the tags, using the system function (system.tag.import). When I hit an API with collision policy “a”-Abort or “i”-Ignore I don’t get any error (unlike when the same task is done manually I’m getting an error message). Please help me how to trycatch this error and send it as a JSON response.
Try adding a separate Java exception catch block:
Nowadays I recommend catching java’s Throwable
instead of java.lang.Exception
. Simpler import, too.