Handle ajax errors in pview loader. Fixes #476