Deal with 501 errors from NVP correctly

This is done by adding the error code to the exception
handlers dictionary as done for other error codes.

Fixes bug #1215583

Change-Id: Ic876c6bccaf94cae626dfc908c4a34dfbcead406
Merge "Deal with 501 errors from NVP correctly"