Skip to content

Commit 145a170

Browse files
committed
Fix documentation error
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
1 parent 61775c0 commit 145a170

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func resourceExampleRead(ctx context.Context, d *schema.ResourceData, m any) dia
9595
// Single API call to get all needed data
9696
resource, _, err := client.Resources.Get(ctx, owner, name)
9797
if err != nil {
98-
if ghErr, ok := errors.AsType[github.ErrorResponse](err); ok {
98+
if ghErr, ok := errors.AsType[*github.ErrorResponse](err); ok {
9999
if ghErr.Response.StatusCode == http.StatusNotFound {
100100
tflog.Info(ctx, "Removing resource from state because it no longer exists", map[string]any{"name": name})
101101
d.SetId("")
@@ -337,7 +337,7 @@ Handle 404s gracefully by removing from state:
337337
```go
338338
resource, _, err := client.Resources.Get(ctx, owner, name)
339339
if err != nil {
340-
if ghErr, ok := errors.AsType[github.ErrorResponse](err); ok {
340+
if ghErr, ok := errors.AsType[*github.ErrorResponse](err); ok {
341341
if ghErr.Response.StatusCode == http.StatusNotFound {
342342
tflog.Info(ctx, "Removing resource from state because it no longer exists", map[string]any{"name": name})
343343
d.SetId("")

0 commit comments

Comments
 (0)