fix(oauth): fix handling of auth errors for invalid endpoints