Compare commits
2 commits
d5dd28b4e5
...
939ae84a10
Author | SHA1 | Date | |
---|---|---|---|
939ae84a10 | |||
cfafabc3d8 |
1 changed files with 5 additions and 0 deletions
|
@ -85,6 +85,11 @@ impl From<Response> for EditError {
|
|||
|
||||
if status.is_redirection() {
|
||||
let location = headers.get("Location").unwrap().to_str().unwrap();
|
||||
if location == "/" {
|
||||
// This is supposed to be handled from delete_paste function,
|
||||
// This is an error enum, we can't represent success
|
||||
panic!("response is successfult");
|
||||
}
|
||||
return Self::UnexpectedRedirect(location.to_string());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue