mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
MAINTENANCE: Unknown rtypes should return errors, not a panic (#945)
* Eliminate panics related to unknown rtypes
This commit is contained in:
@@ -304,9 +304,8 @@ func (api *inwxAPI) GetZoneRecords(domain string) (models.Records, error) {
|
||||
default:
|
||||
err = rc.PopulateFromString(rType, record.Content, domain)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("INWX: unparsable record received: %w", err))
|
||||
return nil, fmt.Errorf("INWX: unparsable record received: %w", err)
|
||||
}
|
||||
|
||||
records = append(records, rc)
|
||||
|
Reference in New Issue
Block a user