Added exception handling to DwApiOAuth.