web: reload page on fetch error. Should help with expired cookies
This commit is contained in:
parent
c71ab8e9e8
commit
43efdf18a0
@ -292,12 +292,16 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Msg::FrontPageResult(Err(e)) => error!("error FrontPageResult: {e:?}"),
|
Msg::FrontPageResult(Err(e)) => {
|
||||||
|
orders.send_msg(Msg::Reload);
|
||||||
|
error!("error FrontPageResult: {e:?}");
|
||||||
|
}
|
||||||
Msg::FrontPageResult(Ok(graphql_client::Response {
|
Msg::FrontPageResult(Ok(graphql_client::Response {
|
||||||
data: None,
|
data: None,
|
||||||
errors: None,
|
errors: None,
|
||||||
..
|
..
|
||||||
})) => {
|
})) => {
|
||||||
|
orders.send_msg(Msg::Reload);
|
||||||
error!("FrontPageResult no data or errors, should not happen");
|
error!("FrontPageResult no data or errors, should not happen");
|
||||||
}
|
}
|
||||||
Msg::FrontPageResult(Ok(graphql_client::Response {
|
Msg::FrontPageResult(Ok(graphql_client::Response {
|
||||||
@ -305,6 +309,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
errors: Some(e),
|
errors: Some(e),
|
||||||
..
|
..
|
||||||
})) => {
|
})) => {
|
||||||
|
orders.send_msg(Msg::Reload);
|
||||||
error!("FrontPageResult error: {e:?}");
|
error!("FrontPageResult error: {e:?}");
|
||||||
}
|
}
|
||||||
Msg::FrontPageResult(Ok(graphql_client::Response {
|
Msg::FrontPageResult(Ok(graphql_client::Response {
|
||||||
@ -400,6 +405,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
orders.send_msg(Msg::WindowScrolled);
|
orders.send_msg(Msg::WindowScrolled);
|
||||||
}
|
}
|
||||||
Msg::ShowThreadResult(bad) => {
|
Msg::ShowThreadResult(bad) => {
|
||||||
|
orders.send_msg(Msg::Reload);
|
||||||
error!("show_thread_query error: {bad:#?}");
|
error!("show_thread_query error: {bad:#?}");
|
||||||
}
|
}
|
||||||
Msg::CatchupRequest { query } => {
|
Msg::CatchupRequest { query } => {
|
||||||
@ -432,6 +438,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Msg::CatchupResult(bad) => {
|
Msg::CatchupResult(bad) => {
|
||||||
|
orders.send_msg(Msg::Reload);
|
||||||
error!("catchup_query error: {bad:#?}");
|
error!("catchup_query error: {bad:#?}");
|
||||||
}
|
}
|
||||||
Msg::SelectionSetNone => {
|
Msg::SelectionSetNone => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user