Skip to main content

check_served

Function check_served 

Source
pub fn check_served(
    path: &str,
    content_type: Option<&str>,
    body: &str,
) -> Result<(), String>
Expand description

Whether what came back for a staged /data file is that file. A server with an SPA fallback answers a missing file with the app’s index.html and a 200, so a missing lexicon.json would otherwise surface as a JSON parse error (“expected value at line 1 column 1”) instead of saying the file is not deployed.