Skip to content

Commit

Permalink
handle error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yggverse committed Jan 25, 2025
1 parent a2bd719 commit 5d619ff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/app/browser/window/tab/item/client/driver/gemini.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
}
Expand Down

0 comments on commit 5d619ff

Please sign in to comment.