intercepting auth errors with sync