fix(ux): Disable issue URLs for a known shutdown panic in abscissa (#6486)

* Disable bug report URLs for a known abscissa panic

* Remove trailing whitespace in deny.toml

* upddate doc

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
This commit is contained in:
teor 2023-04-14 14:36:38 +10:00 committed by GitHub
parent efba56daa4
commit cf6d0cc2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,5 @@
//! Zebrad Abscissa Application
mod entry_point;
use self::entry_point::EntryPoint;
use std::{fmt::Write as _, io::Write as _, process};
use abscissa_core::{
@ -18,6 +15,9 @@ use zebra_state::constants::{DATABASE_FORMAT_VERSION, LOCK_FILE_ERROR};
use crate::{commands::ZebradCmd, components::tracing::Tracing, config::ZebradConfig};
mod entry_point;
use entry_point::EntryPoint;
/// See <https://docs.rs/abscissa_core/latest/src/abscissa_core/application/exit.rs.html#7-10>
/// Print a fatal error message and exit
fn fatal_error(app_name: String, err: &dyn std::error::Error) -> ! {
@ -309,10 +309,14 @@ impl Application for ZebradApp {
return false;
}
// Don't ask users to create bug reports for known timeouts, duplicate blocks,
// full disks, or updated binaries.
let error_str = error.to_string();
!error_str.contains("timed out")
&& !error_str.contains("duplicate hash")
&& !error_str.contains("No space left on device")
// abscissa panics like this when the running zebrad binary has been updated
&& !error_str.contains("error canonicalizing application path")
}
});