mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
handle error codes
This commit is contained in:
parent
a2bd719a2d
commit
5d619ff684
2 changed files with 16 additions and 16 deletions
24
README.md
24
README.md
|
|
@ -61,18 +61,18 @@ GTK 4 / Libadwaita client written in Rust
|
||||||
* [x] Redirection
|
* [x] Redirection
|
||||||
* [x] `30` Temporary
|
* [x] `30` Temporary
|
||||||
* [x] `31` Permanent
|
* [x] `31` Permanent
|
||||||
* [ ] Temporary failure
|
* [x] Temporary failure
|
||||||
* [ ] `40` Unspecified condition
|
* [x] `40` Unspecified condition
|
||||||
* [ ] `41` Server unavailable
|
* [x] `41` Server unavailable
|
||||||
* [ ] `42` CGI error
|
* [x] `42` CGI error
|
||||||
* [ ] `43` Proxy error
|
* [x] `43` Proxy error
|
||||||
* [ ] `44` Slow down
|
* [x] `44` Slow down
|
||||||
* [ ] Permanent failure
|
* [x] Permanent failure
|
||||||
* [ ] `50` General
|
* [x] `50` General
|
||||||
* [ ] `51` Not found
|
* [x] `51` Not found
|
||||||
* [ ] `52` Gone
|
* [x] `52` Gone
|
||||||
* [ ] `53` Proxy request refused
|
* [x] `53` Proxy request refused
|
||||||
* [ ] `59` Bad request
|
* [x] `59` Bad request
|
||||||
* [x] Client certificates
|
* [x] Client certificates
|
||||||
* [x] `60` Certificate requested
|
* [x] `60` Certificate requested
|
||||||
* [x] `61` Certificate not authorized
|
* [x] `61` Certificate not authorized
|
||||||
|
|
|
||||||
|
|
@ -483,12 +483,12 @@ fn handle(
|
||||||
subject.tab_page.set_title(&status.title());
|
subject.tab_page.set_title(&status.title());
|
||||||
redirects.replace(0); // reset
|
redirects.replace(0); // reset
|
||||||
}
|
}
|
||||||
status => {
|
error => {
|
||||||
let _status = subject.page.content.to_status_failure();
|
let status = subject.page.content.to_status_failure();
|
||||||
_status.set_description(Some(&format!("Undefined status code `{status}`")));
|
status.set_description(Some(&error.to_string()));
|
||||||
subject.page.navigation.request.widget.entry.set_progress_fraction(0.0);
|
subject.page.navigation.request.widget.entry.set_progress_fraction(0.0);
|
||||||
subject.tab_page.set_loading(false);
|
subject.tab_page.set_loading(false);
|
||||||
subject.tab_page.set_title(&_status.title());
|
subject.tab_page.set_title(&status.title());
|
||||||
redirects.replace(0); // reset
|
redirects.replace(0); // reset
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue