more error handling tweaks (401)