Bug fix: Fixed bugs with APConnection

1. Fixed issue with get connection by endpoint.
2. Added overload parameter to ignore duplicate connection errors.