Better treatment of exceptions when accessing Network API