diff --git a/CHANGELOG.md b/CHANGELOG.md index 7862488433735b..4f294b22f7901e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ In the future, we will probably offer a way to explicitly choose which behaviour - console: add custom_column_names to track_table request with replaced invalid characters (#992) - console: add details button to the success notification to see inserted row - console: add request preview for REST endpoints +- cli: fix errors being ignored during `metadata apply` in config v3 (fix #6784) ## v2.0.0-alpha.7 diff --git a/cli/commands/metadata.go b/cli/commands/metadata.go index 11defc5fe0ab08..d11ba55bc33b5d 100644 --- a/cli/commands/metadata.go +++ b/cli/commands/metadata.go @@ -1,6 +1,8 @@ package commands import ( + "fmt" + "github.com/hasura/graphql-engine/cli" "github.com/hasura/graphql-engine/cli/internal/metadataobject" "github.com/hasura/graphql-engine/cli/internal/scripts" @@ -92,8 +94,9 @@ func executeMetadata(cmd string, ec *cli.ExecutionContext) error { } return nil } - - metadataHandler.V2ApplyMetadata() + if err := metadataHandler.V2ApplyMetadata(); err != nil { + return fmt.Errorf("\n%w", err) + } } return nil }