mirror of
https://github.com/nushell/nushell.git
synced 2025-07-07 18:07:02 +02:00
Refactor send_request in client.rs (#13701)
Closes #13687 Closes #13686 # Description Light refactoring of `send_request `in `client.rs`. In the end there are more lines but now the logic is more concise and facilitates adding new conditions in the future. Unit tests ran fine and I tested a few cases manually. Cool project btw, I'll be using nushell from now on.
This commit is contained in:
@ -639,6 +639,15 @@ pub enum ShellError {
|
||||
span: Span,
|
||||
},
|
||||
|
||||
/// An unsupported body input was used for the respective application body type in 'http' command
|
||||
///
|
||||
/// ## Resolution
|
||||
///
|
||||
/// This error is fairly generic. Refer to the specific error message for further details.
|
||||
#[error("Unsupported body for current content type")]
|
||||
#[diagnostic(code(nu::shell::unsupported_body), help("{msg}"))]
|
||||
UnsupportedHttpBody { msg: String },
|
||||
|
||||
/// An operation was attempted with an input unsupported for some reason.
|
||||
///
|
||||
/// ## Resolution
|
||||
|
Reference in New Issue
Block a user