#[non_exhaustive]pub enum RenderError {
Show 13 variants
#[non_exhaustive] StaticRoute {
route: String,
message: String,
},
#[non_exhaustive] Manifest {
route: String,
message: String,
},
#[non_exhaustive] RouteMode {
route: String,
},
#[non_exhaustive] Unfinalized {
route: String,
},
#[non_exhaustive] Props {
cause: PropsError,
},
#[non_exhaustive] Binding {
route: String,
errors: Vec<PropsError>,
},
#[non_exhaustive] MissingModule {
route: String,
},
#[non_exhaustive] Walk {
route: String,
component_path: Vec<String>,
counts: RenderCounts,
cause: IrError,
},
#[non_exhaustive] IslandState {
route: String,
component_path: Vec<String>,
counts: RenderCounts,
cause: IrError,
},
#[non_exhaustive] Policy {
route: String,
cause: PolicyError,
},
#[non_exhaustive] Nonce {
route: String,
cause: NonceError,
},
#[non_exhaustive] Budget {
route: String,
component_path: Vec<String>,
counts: RenderCounts,
cause: IrError,
},
#[non_exhaustive] Fault {
route: String,
component_path: Vec<String>,
counts: RenderCounts,
message: String,
},
}Expand description
Why a page was not rendered. Nothing reaches the browser unless the handler sends it: answer with the application’s own error page.
Every error has a stable code, the
route it was rendering, and the
component_path where it stopped (empty
when the failure is not inside a component). The codes, by family:
| Code | Variant | Cause |
|---|---|---|
| RENDER-101 | MissingModule | The config has no module or no slots to render |
| RENDER-104 | Manifest | Invalid manifest or referenced integrity |
| RENDER-105 | StaticRoute | A static SSR route requires JavaScript for islands, configuration or preloads |
| RENDER-103 | RouteMode | A shell route is absent or not Browser |
| RENDER-406 | Unfinalized | Required startup finalization is incomplete |
| RENDER-102 | Walk | The walk refused the module or its data |
| RENDER-503 | Walk | A keyed list row has no usable identity, repeats another row’s key, or has no single root to carry it (FORMA-181) |
| RENDER-201 | Policy | A policy extension is not a source a page may add |
| RENDER-202 | Nonce | The system random source failed to draw a nonce |
| RENDER-301 | Budget | The complete escaped response passed max_output_bytes |
| RENDER-302 | Budget | The walk’s list rows passed max_list_iterations |
| RENDER-303 | Budget | Lists or control flow nested past the walker’s depth |
| RENDER-501 | IslandState | Declared island input mapping or value is invalid |
| RENDER-502 | IslandState | Escaped island state exceeds one MiB |
| RENDER-399 | Fault | The render panicked; a defect, not an input |
A code, once published, keeps its meaning; new causes get new codes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]StaticRoute
RENDER-105: a static SSR route cannot execute or preload JavaScript.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Manifest
RENDER-104: manifest or referenced resource integrity is invalid.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]RouteMode
RENDER-103: a browser shell requires an explicitly declared browser route.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Unfinalized
RENDER-406: every SSR handler must bind and the registry must finalize first.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Props
RENDER-401..404: a handler value violates its declared contract.
Fields
This variant is marked as non-exhaustive
cause: PropsErrorChecked value error, including its declared property path and sources.
#[non_exhaustive]Binding
RENDER-405: a development reload no longer matches the bound handler.
Fields
This variant is marked as non-exhaustive
errors: Vec<PropsError>Binding refusals for the changed module. No partial HTML is returned.
#[non_exhaustive]MissingModule
RENDER-101: Server rendering, and the config
carries no module or no slots for it. A browser-rendered route is
served by render_browser_shell, by declaration.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Walk
RENDER-102: the walk refused the module or the data it was given.
Fields
This variant is marked as non-exhaustive
counts: RenderCountsHow far the walk got.
#[non_exhaustive]IslandState
RENDER-501 or RENDER-502: no partial state or page is returned.
Fields
This variant is marked as non-exhaustive
counts: RenderCountsBody walk work completed before refusal.
#[non_exhaustive]Policy
RENDER-201: a policy extension was refused; there is no page to send without its policy.
Fields
This variant is marked as non-exhaustive
cause: PolicyErrorThe refused extension.
#[non_exhaustive]Nonce
RENDER-202: no nonce could be drawn, so no policy could bless the page.
Fields
This variant is marked as non-exhaustive
cause: NonceErrorThe failed draw.
#[non_exhaustive]Budget
RENDER-301, RENDER-302, RENDER-303: the complete response exceeded its output-byte limit, or the walk reached a list/depth budget.
Fields
This variant is marked as non-exhaustive
counts: RenderCountsBody-only walk work, including when complete response assembly refuses.
#[non_exhaustive]Fault
RENDER-399: the render panicked and the panic was caught. The
process and every other request carry on, while the application
unwinds on panic; under panic = "abort" the process ends.
Fields
This variant is marked as non-exhaustive
counts: RenderCountsHow far the walk got, when it was in the walk.
Implementations§
Source§impl RenderError
impl RenderError
Sourcepub fn property_path(&self) -> Option<&str>
pub fn property_path(&self) -> Option<&str>
The declared property path of a checked-value refusal.
Sourcepub fn component_path(&self) -> &[String]
pub fn component_path(&self) -> &[String]
The component names of the islands open where the render stopped, outermost first; empty when it stopped outside every island or before the walk. A component the compiler inlined into its parent has no name until FMIR v3’s source positions.
Sourcepub fn counts(&self) -> Option<RenderCounts>
pub fn counts(&self) -> Option<RenderCounts>
How far the walk got, for an error raised during it.
Trait Implementations§
Source§impl Clone for RenderError
impl Clone for RenderError
Source§impl Debug for RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
impl Eq for RenderError
Source§impl Error for RenderError
impl Error for RenderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()