Skip to content

Commit

Permalink
catch record not found in update
Browse files Browse the repository at this point in the history
  • Loading branch information
cyx committed Dec 11, 2018
1 parent 623a347 commit 3ecca6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ func (s *RecordsService) Create(r *dns.Record) (*http.Response, error) {
switch err.(*Error).Message {
case "zone not found":
return resp, ErrZoneMissing
case "record not found":
return resp, ErrRecordMissing
case "record already exists":
return resp, ErrRecordExists
}
Expand Down Expand Up @@ -89,6 +87,8 @@ func (s *RecordsService) Update(r *dns.Record) (*http.Response, error) {
switch err.(*Error).Message {
case "zone not found":
return resp, ErrZoneMissing
case "record not found":
return resp, ErrRecordMissing
case "record already exists":
return resp, ErrRecordExists
}
Expand Down

0 comments on commit 3ecca6b

Please sign in to comment.