Fixing auth exception encoding.