API: Getting 2 !traps with only 1 !done

This can’t be right…

Send bad command…

>>>/interface/an/print
>>>.tag=1
!trap
.tag=1
=category=0
=message=no such command or directory (an)
!trap
.tag=1
=message=no such command prefix
!done
.tag=1

2 !traps and only 1 !done? Ok maybe if there are really 2 errors but why 2 traps for the same error?

On 6.33.3.

There’s always one !done per command, so that one is expected.

As for the two !trap replies… It seems like the reason is a somewhat weird design of the way commands are validated. Maybe one error refers to the menu, while the other refers to the command in that menu not existing. Or maybe one of the !trap replies is kept for backwards compatibility reasons (notice that one doesn’t have the “category” property)… that I can’t quite put my finger on (I mean, most people just check for “any” !trap replies, not for replies matching a certain pattern).

Yeah, after I posted I thought “oh wait… the !done refers to the command, not the individual traps.”

I also just realized that if I send ‘/interface/vlan/prrrrrint’, I only get 1 trap without a category.

Anyway, I can handle it it just seems that if the menu fails, it should stop and not send another trap.