#488 improved error handling for oauth errors