When DoEditTask fails to recognise the result status, give a useful error message

Errors like this are not too useful:
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7694943

Change-Id: I28205de7e73ec34f037b4fded56671574c3c0e7f