feat: update mapping functions to include region and improve error handling

This commit is contained in:
Andre_Harms 2026-02-04 20:48:40 +01:00
parent 936ad54f95
commit c96328060d
2 changed files with 206 additions and 92 deletions

View file

@ -21,7 +21,7 @@ func mapFields(
return fmt.Errorf("id not present")
}
if model == nil {
return fmt.Errorf("model input is nil")
return fmt.Errorf("model given is nil")
}
var databaseId int64
@ -36,6 +36,7 @@ func mapFields(
model.Id = types.Int64Value(databaseId)
model.Name = types.StringPointerValue(source.Name)
model.Owner = types.StringPointerValue(cleanString(source.Owner))
model.Region = types.StringValue(region)
return nil
}