hasura/graphql-engine · warning
failed to read metadata status: %w
Error message
failed to read metadata status: %w
What it means
After a successful `metadata reload`, the command automatically checks consistency by reading metadata status via projectmetadata handler. This error means that post-reload consistency read failed — reload worked, but the subsequent status query errored.
Source
Thrown at cli/commands/metadata_reload.go:69
func (o *MetadataReloadOptions) runWithInfo() error {
var op errors.Op = "commands.MetadataReloadOptions.runWithInfo"
o.EC.Spin("Reloading metadata...")
err := o.run()
o.EC.Spinner.Stop()
if err != nil {
return errors.E(op, fmt.Errorf("failed to reload metadata: %w", err))
}
o.EC.Logger.Info("Metadata reloaded")
icListOpts := &metadataInconsistencyListOptions{
EC: o.EC,
}
err = icListOpts.read(projectmetadata.NewHandlerFromEC(icListOpts.EC))
if err != nil {
return errors.E(op, fmt.Errorf("failed to read metadata status: %w", err))
}
if icListOpts.isConsistent {
icListOpts.EC.Logger.Infoln("Metadata is consistent")
} else {
icListOpts.EC.Logger.Warnln(
"Metadata is inconsistent, use 'hasura metadata ic list' command to see the inconsistent objects",
)
}
return nil
}
func (o *MetadataReloadOptions) run() error {
var (
op errors.Op = "commands.MetadataReloadOptions.run"
err error
)View on GitHub (pinned to 724551b9ae)
Solutions
- Simply re-run `metadata inconsistency status` — the reload already succeeded, only the verification failed
- Retry `metadata reload` after a short delay if the server was momentarily busy settling
- Check the wrapped error for auth/network specifics
- If persistent, run `metadata inconsistency list` to verify the server state directly
Example fix
# before hasura metadata reload # reload OK, then: failed to read metadata status # after hasura metadata inconsistency status # verify manually; reload itself succeeded
Defensive patterns
Strategy: retry
Try / catch
if err := reloadCmd.Execute(); err != nil {
if strings.Contains(err.Error(), "failed to read metadata status") {
// reload itself succeeded; verify with `metadata inconsistency status`
}
} Prevention
- Treat post-reload status failures as non-fatal — verify separately
- Add short delays between reload and consistency checks in automation
- Poll status with retries rather than trusting a single read
When it happens
Trigger: `metadata reload` where the reload succeeds but the follow-up read of consistency status fails: transient network failure between the two calls, auth expiry mid-command, or the handler failing to parse the freshly reloaded metadata.
Common situations: Intermittent network issues between the two sequential server calls; server briefly unavailable immediately after reload (restart in progress); large metadata taking time to settle after reload causing read timeouts.
Related errors
- failed to read metadata status: %w
- failed to reload metadata: %w
- error building project metadata: %w
- exporting metadata from server: %w
- reading metadata from response: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/607de01fd7e3fe31.
Report an issue: GitHub.