The local `parse_remote_manifest` — parse + verify, mapping failures to the remote error text.
(
view: &str,
text: &str,
url: &str,
stage: &str,
)
| 219 | /// The local `parse_remote_manifest` — parse + verify, mapping failures to |
| 220 | /// the remote error text. |
| 221 | fn parse_remote_manifest( |
| 222 | view: &str, |
| 223 | text: &str, |
| 224 | url: &str, |
| 225 | stage: &str, |
| 226 | ) -> Result<ViewManifest, Status> { |
| 227 | let manifest = ViewManifest::parse(text).map_err(|error| { |
| 228 | sync_error( |
| 229 | stage, |
| 230 | "remote_error", |
| 231 | url, |
| 232 | format!("Invalid manifest for view '{view}' from remote: {error}"), |
| 233 | ) |
| 234 | })?; |
| 235 | manifest.verify().map_err(|error| { |
| 236 | sync_error( |
| 237 | stage, |
| 238 | "remote_error", |
| 239 | url, |
| 240 | format!("Corrupt manifest for view '{view}' from remote: {error}"), |
| 241 | ) |
| 242 | })?; |
| 243 | Ok(manifest) |
| 244 | } |
| 245 | |
| 246 | /// The local `plan_view_sync` — the set-union membership model with the |
| 247 | /// identity checks and the declare decision. |
no test coverage detected