Fix showing nonexistent NetworkGateway throws 500 instead of 404

Change-Id: I5304bd52f7a5ae22fbc0d48206d7c1d282b34a91
Closes-Bug: #1252921
Merge "Fix showing nonexistent NetworkGateway throws 500 instead of 404"