Skip to content

Commit

Permalink
Merged automatically by CI pipeline
Browse files Browse the repository at this point in the history
SCALRCORE-25795 - Scalr provider > Invalid error of failed runs
  • Loading branch information
emocharnik committed Jul 20, 2023
2 parents 463790d + 81dc553 commit 336c295
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scalr.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,5 +555,15 @@ func checkResponseCode(r *http.Response) error {
}
}

if r.StatusCode == 403 {
return fmt.Errorf(
"The Scalr Terraform provider has been configured with an access token that lacks sufficient permissions." +
" If you are running remotely, follow the documentation (https://docs.scalr.io/docs/scalr) on how to " +
"enable the Scalr provider configuration in the remote workspace. " +
"If running locally, ensure you have enough permissions to perform actions." +
"\n Errors: " + strings.Join(errs, "\n"),
)
}

return fmt.Errorf(strings.Join(errs, "\n"))
}

0 comments on commit 336c295

Please sign in to comment.