Skip to content

Commit f88c70f

Browse files
committed
Improve error messages in Import
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
1 parent 083d575 commit f88c70f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

github/resource_github_emu_group_mapping.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package github
22

33
import (
44
"context"
5+
"fmt"
56
"net/http"
67
"strconv"
78

@@ -302,11 +303,11 @@ func resourceGithubEMUGroupMappingImport(ctx context.Context, d *schema.Resource
302303
// <group-id>:<team-slug>
303304
groupIDString, teamSlug, err := parseID2(d.Id())
304305
if err != nil {
305-
return nil, err
306+
return nil, fmt.Errorf("could not parse import ID (%s), expected format: <group-id>:<team-slug>. Parse error: %w", importID, err)
306307
}
307308
groupID, err := strconv.Atoi(groupIDString)
308309
if err != nil {
309-
return nil, err
310+
return nil, unconvertibleIdErr(groupIDString, err)
310311
}
311312

312313
tflog.Debug(ctx, "Parsed two-part import ID", map[string]any{

0 commit comments

Comments
 (0)