Bus UI Status Output
ProviderError turns provider failures into public-safe status output.
Use it when a provider call fails and you need a surfaced title, summary, status, request ID, and field-level hints without leaking raw diagnostics.
Public API
ProviderError(p ProviderErrorProps) gx.Node
The input model is ProviderErrorProps, plus
ProviderErrorField and ProviderErrorFromResult(Result)
for projection from a runtime result.
When to use it
Use ProviderError for public failure states that belong on screen or
in a response body. It is the right fit when validation should fail closed and
redaction should happen before render.
Live demo
Example
Go API
import (
gx "github.com/busdk/bus-gx/pkg/gx"
ui "github.com/busdk/bus-ui/pkg/ui"
)
node := ui.ProviderError(ui.ProviderErrorProps{
Title: "Provider request failed",
Summary: "The backend returned a validation error.",
Code: "invalid_request",
Status: "failed",
RequestID: "req_12345",
Fields: map[string]string{
"field": "invoice_id",
},
})
html, err := gx.RenderHTML(node)
.gx source
In .gx source, author the visible component state as GX markup.
Keep the Go API block above for the package helper or render-boundary call.
package busuiexamples
import gx "github.com/busdk/bus-gx/pkg/gx"
func ProviderErrorExample() gx.Node {
return <section class="provider-error" role="alert">
<h2><Text value={"Provider unavailable"}></Text></h2>
<p><Text value={"Retry the projection after the provider recovers."}></Text></p>
</section>
}
Use the public pkg/ui facade for this provider error surface.