From 2a66097e15527081b768dddfa333ab4ad332556e Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Thu, 16 Feb 2023 11:14:32 +0530 Subject: [PATCH] Check for err in repo connect (#2537) ## Description Add a missing err check to repo connect. Follow up to https://github.com/alcionai/corso/pull/2502 . ## Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No ## Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup ## Issue(s) * # ## Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/pkg/repository/repository.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pkg/repository/repository.go b/src/pkg/repository/repository.go index ab4e05733..2a2ac34ee 100644 --- a/src/pkg/repository/repository.go +++ b/src/pkg/repository/repository.go @@ -222,6 +222,9 @@ func ConnectAndSendConnectEvent(ctx context.Context, opts control.Options, ) (Repository, error) { repo, err := Connect(ctx, acct, s, opts) + if err != nil { + return nil, err + } r := repo.(*repository)