Problem with SC API triggering incorrect response step - and therefore failing

I’m puzzled by a SC action not working. It was created following a tutorial by @Teodor some time ago. I’ve used it on several sites without any problem. Today, I tried it on a new site and it didn’t work. What I’m particularly puzzled about is that if I remove one of my response steps, it works fine. So the issue is probably more general - why is the ‘else’ branch running at all, given the condtion is met?

Below are the relevant steps, with the response step indicated. This version, with the step disabled works fine; if I enable it, the action fails. The response in the developer tools is the description I entered in the response step (so not very useful for debuggin).

Well are you sure your condition is true then?
Maybe test with some condition which you are 100% sure it evaluates to true.

Yes - because the database is updated and the password is reset. It all works fine. On the front end I display an onsuccess notification - this appears as expected (but not if I have the disabled step enabled).

In case it’s relevant, I’m using:
Windows 10, PHP, MySQL, Wappler v3.7.8

What is with the repeat, what are you repeating? The else condition works fine. You do repeat the steps, any condition in the repeat that fails will trigger the 400 response.

Thanks Patrick. I found the problem. I wasn’t repeating anything - at least not intentionally. This SA file was created when it was necessary to use a repeat, even for a single result, and there was no single record query option.

The problem was caused by my having duplicated a record in the user table I was querying, for testing purposes. This caused the second (unnecessary) record update to fail - and hence the correct response.