Skip to content

Commit 0831d32

Browse files
authored
Merge pull request #41 from launchdarkly/at/fix-notfound-err
Don't error out when repo is not found
2 parents c4248ad + 6e1ddbe commit 0831d32

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the ld-find-code-refs program will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [0.2.1] - 2019-01-17
6+
### Fixed
7+
- Fix a bug causing an error to be returned when a repository connection to LaunchDarkly does not initially exist on execution.
8+
59
## [0.2.0] - 2019-01-16
610
### Fixed
711
- Use case-sensitive `ag` search so we don't get false positives that look like flag keys but have different casing.

internal/ld/ld.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ func (c ApiClient) do(req *h.Request) (*http.Response, error) {
238238
if err == nil {
239239
if ldErr.Code == "updateSequenceId_conflict" {
240240
return res, BranchUpdateSequenceIdConflictErr
241+
} else if ldErr.Code == "not_found" {
242+
return res, NotFoundErr
241243
} else if ldErr.Message != "" {
242244
return res, fmt.Errorf("%s, %s", ldErr.Code, ldErr.Message)
243245
}

0 commit comments

Comments
 (0)