diff --git a/src/rentry.rs b/src/rentry.rs index fc4e7cd..e9496f4 100644 --- a/src/rentry.rs +++ b/src/rentry.rs @@ -85,6 +85,11 @@ impl From 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()); }