Fixed array access error on request.error listener closure

When using a request.error listener in the client, a array access error was triggered.