feat: add extra warning if shipment api breaks

This commit is contained in:
jane400 2024-09-17 19:23:12 +02:00 committed by jane400
parent ebde744290
commit 6fbdc6193c

View file

@ -342,10 +342,15 @@ impl Component for Ready {
} }
} }
Err(err) => { Err(err) => {
sender.output(ReadyOutput::Error(err)).unwrap(); if err == LibraryError::APIChange {
println!("Upstream API for parcel tracking broke");
sender.input(ReadyInput::ServiceBorked(Services::SendungVerfolgung));
sender.output(ReadyOutput::Notification("Shipment Tracking API has changed. Deactivating that service.".to_string())).unwrap();
} else {
sender.output(ReadyOutput::Error(err)).unwrap();
}
} }
}, },
} }
} }
} }