webserver_base/feed/
error.rs1#[derive(Debug, thiserror::Error)]
9pub enum FeedError {
10 #[error("feed entry `{path}` has an empty {field}; readers render it as a blank row")]
12 IncompleteEntry { path: String, field: &'static str },
13
14 #[error(
16 "feed entry path `{path}` is not rooted; use a site-relative path such as `/blog/a-post`"
17 )]
18 UnrootedPath { path: String },
19
20 #[error(
23 "feed entry `{path}` uses `srcset`, which is not rewritten; use a single `src` so the \
24 feed cannot ship half-absolute image URLs"
25 )]
26 SrcsetUnsupported { path: String },
27
28 #[error(
30 "the feed's page `{page_url}` is not a declared page; its `rel=\"alternate\"` would 404"
31 )]
32 PageNotDeclared { page_url: String },
33
34 #[error("feed entry `{path}` names image `{image}`, which is not in the asset manifest")]
36 UnresolvedImage { path: String, image: String },
37
38 #[error("failed to serialize the {format} feed")]
40 Write {
41 format: &'static str,
42 #[source]
43 source: std::io::Error,
44 },
45
46 #[error("the serialized {format} feed was not valid UTF-8")]
49 Encoding { format: &'static str },
50
51 #[error("failed to serialize the JSON feed")]
53 Json {
54 #[source]
55 source: serde_json::Error,
56 },
57}