ory/hydra · warning
status is not yet ok: %s
Error message
status is not yet ok: %s
What it means
This error comes from the httpx WaitFor helper: it polls an HTTP endpoint and parses the JSON body with gjson; if the top-level "status" field is not the string "ok", it returns 'status is not yet ok: <body>'. It means the service responded, but reports it is not ready/healthy yet (or the body shape is unexpected).
Source
Thrown at oryx/httpx/wait_for.go:44
if err != nil {
return err
}
res, err := client.Do(req)
if err != nil {
return err
}
defer func() {
_ = res.Body.Close()
}()
body, err := io.ReadAll(res.Body)
if err != nil {
return err
}
if gjson.GetBytes(body, "status").String() != "ok" {
return errors.Errorf("status is not yet ok: %s", body)
}
return nil
},
append([]retry.Option{
retry.DelayType(retry.BackOffDelay),
retry.Delay(time.Second),
retry.MaxDelay(time.Second * 2),
retry.Attempts(20),
}, opts...)...)
}
View on GitHub (pinned to 4174065ffb)
Solutions
- Wait longer / increase the retry deadline — the service may simply still be booting
- Check the target service's logs to see why status is not ok (failed migrations, bad config)
- Verify you are polling the correct health/status endpoint and port
- Inspect the body printed in the error to see the actual status value reported
Example fix
// before
httpx.WaitFor(ctx, "http://localhost:4434/admin/status") // fails while service initializes
// after
require.Eventually(t, func() bool {
resp, err := http.Get("http://localhost:4434/admin/status")
return err == nil && resp.StatusCode == http.StatusOK
}, 30*time.Second, 500*time.Millisecond) Defensive patterns
Strategy: retry
Validate before calling
func isReady(url string) bool {
body, err := http.Get(url)
if err != nil { return false }
defer body.Body.Close()
b, _ := io.ReadAll(body.Body)
return gjson.GetBytes(b, "status").String() == "ok"
} Try / catch
err := httpx.WaitFor(ctx, url)
if err != nil {
var statusErr = err // body is embedded in the message
log.Printf("service not ready after retries: %v", statusErr)
// inspect service logs before giving up
} Prevention
- Give services enough retry time at startup (increase backoff/deadline)
- Poll the documented health/status endpoint on the right port
- Check the target service logs when this error persists
- Verify the endpoint actually returns JSON with a top-level "status" field
When it happens
Trigger: Calling httpx.WaitFor (or a library startup that uses it) against an endpoint whose JSON body has status != "ok" at that moment; retries continue via retry.BackOffDelay until deadline.
Common situations: Waiting for a service (e.g. Kratos/Oathkeeper/hydra dev server or a migration endpoint) that is still starting up; hitting the wrong port or wrong health endpoint; service permanently degraded so the wait times out with this as the last error.
Related errors
- issuer URL must be set unless development mode is enabled
- global secret is not configured
- errKeyNotFound
- http(s) loader disabled
- can not serve request over insecure http
AI-assisted analysis of ory/hydra@4174065ffb (2026-09-03).
Data as JSON: /api/errors/d076eddcf6ee5ebb.
Report an issue: GitHub.