feat: add extra warning if shipment api breaks
This commit is contained in:
parent
ebde744290
commit
6fbdc6193c
1 changed files with 7 additions and 2 deletions
|
@ -342,10 +342,15 @@ impl Component for Ready {
|
|||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue