On Error responds only to server error messages, not to DCC errors.
There are already On Sendfail and On Getfail events, which trigger whether a DCC send/get fails. and nope, it doesn't tell exactly what happened.
By the way, the correct form is:
On
*:sendfail:filename match:{ commands }
On
*:getfail:filename match:{ commands }
And not as used above.
Good night