Connection errors are also related to this error code,you could try opening the ports for Battlefield 4 or putting your PS4 into your routers DMZ.
https://help.ea.com/uk/help/faq/opening-tcp-or-udp-ports-for-connection-issues/
Connecting your system via ethernet cable or powerline network adapters will drastically improve connection stability over wireless anyday.