API error response unspecific

I encountered this while creating a workflow using n8n and zammad API node.
Everything else in my workflow works fine but when the AI agent tries to create a user with an email address that the system already has, it receives a very unspecific response and gets confused.

Infos:

  • Used Zammad version: 6.5.1
  • Used Zammad installation type: docker-compose
  • Operating system: debian

Expected behavior:

  • API to return message: “user already exists”

Actual behavior:

  • API returns “Your request is invalid or could not be processed by the service”

Steps to reproduce the behavior:

  • Create a workflow in n8n and use the zammad API node to create a user with an already registered email address

It’s not really assistance that you need, right? You just want the system to change for your workflow to be more precise?

That’s correct, unless I’m missing something or doing something wrong and shouldn’t be getting this message back. If so, please let me know.
Otherwise, yes, a more precise response would be much more useful.

You’re trying to create a user that already exists and the response by the API is not precise enough?

Zammad by defaults allows unique email addresses.
While you can disable that with a hidden setting, I cannot recommend to do that at all.

The clean way would be:
Check if the user exists and if not create the user.

If you’re in the process of a ticket creation, you may want to use ‘guess’ instead.

Got it. I was hoping to do it all in one API call.

Also the response back sounded buggy and I think it can be improved.

I’ll try what you suggested instead. Thanks for the quick responses and tips.