mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 08:35:28 +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] `30` Temporary
|
||||
* [x] `31` Permanent
|
||||
* [ ] Temporary failure
|
||||
* [ ] `40` Unspecified condition
|
||||
* [ ] `41` Server unavailable
|
||||
* [ ] `42` CGI error
|
||||
* [ ] `43` Proxy error
|
||||
* [ ] `44` Slow down
|
||||
* [ ] Permanent failure
|
||||
* [ ] `50` General
|
||||
* [ ] `51` Not found
|
||||
* [ ] `52` Gone
|
||||
* [ ] `53` Proxy request refused
|
||||
* [ ] `59` Bad request
|
||||
* [x] Temporary failure
|
||||
* [x] `40` Unspecified condition
|
||||
* [x] `41` Server unavailable
|
||||
* [x] `42` CGI error
|
||||
* [x] `43` Proxy error
|
||||
* [x] `44` Slow down
|
||||
* [x] Permanent failure
|
||||
* [x] `50` General
|
||||
* [x] `51` Not found
|
||||
* [x] `52` Gone
|
||||
* [x] `53` Proxy request refused
|
||||
* [x] `59` Bad request
|
||||
* [x] Client certificates
|
||||
* [x] `60` Certificate requested
|
||||
* [x] `61` Certificate not authorized
|
||||
|
|
|
|||
|
|
@ -483,12 +483,12 @@ fn handle(
|
|||
subject.tab_page.set_title(&status.title());
|
||||
redirects.replace(0); // reset
|
||||
}
|
||||
status => {
|
||||
let _status = subject.page.content.to_status_failure();
|
||||
_status.set_description(Some(&format!("Undefined status code `{status}`")));
|
||||
error => {
|
||||
let status = subject.page.content.to_status_failure();
|
||||
status.set_description(Some(&error.to_string()));
|
||||
subject.page.navigation.request.widget.entry.set_progress_fraction(0.0);
|
||||
subject.tab_page.set_loading(false);
|
||||
subject.tab_page.set_title(&_status.title());
|
||||
subject.tab_page.set_title(&status.title());
|
||||
redirects.replace(0); // reset
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue