[automerger skipped] Fix NullPointerException on addErrorCode when input is Invalid error code am: ad90e1bfe1 am: c2cdb2c764 am: 17120a7ccd -s ours

am skip reason: Change-Id I43b8415ab98b4cf6520c3240dc544a9f62730a4e with SHA-1 ad90e1bfe1 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/NetworkStack/+/11987398

Change-Id: Iea1802b2ffa4d36d294a1461aa541a1ac6c15e45