feat: reject non-200 responses in hitta component with precise error

This commit is contained in:
2026-06-05 15:07:11 +02:00
parent 9c4493c1a4
commit 09f05b8c23
+7
View File
@@ -33,6 +33,13 @@ impl Guest for Component {
));
};
if first.status != 200 {
return Err(LookupError::ParseFailed(format!(
"unexpected HTTP status {}",
first.status
)));
}
match parser::parse(&first.body) {
Ok(entry) => Ok(Entry {
messages: entry.messages,