Fixed connection error handling in request plugin