refactor creds. Preserve Exception Details