Fixing OAuth error with exceptions