mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-19 17:58:39 +00:00
Add server message to user-facing error on 429 for tunnel creation (#185600)
* Add server message to user-facing error on 429 for tunnel creation * Update cli/src/tunnels/dev_tunnels.rs Co-authored-by: Connor Peet <connor@peet.io> * fix lint error --------- Co-authored-by: Connor Peet <connor@peet.io>
This commit is contained in:
@@ -611,7 +611,7 @@ pub enum TunnelSubcommand {
|
||||
/// Restarts any running tunnel on the system.
|
||||
Restart,
|
||||
|
||||
/// Gets whether there is a tunnel running on the current machineiou.
|
||||
/// Gets whether there is a tunnel running on the current machine.
|
||||
Status,
|
||||
|
||||
/// Rename the name of this machine associated with port forwarding service.
|
||||
|
||||
@@ -471,9 +471,17 @@ impl DevTunnels {
|
||||
continue;
|
||||
}
|
||||
|
||||
if let Some(d) = e.get_details() {
|
||||
let detail = d.detail.unwrap_or_else(|| "unknown".to_string());
|
||||
return Err(AnyError::from(TunnelCreationFailed(
|
||||
name.to_string(),
|
||||
detail,
|
||||
)));
|
||||
}
|
||||
|
||||
return Err(AnyError::from(TunnelCreationFailed(
|
||||
name.to_string(),
|
||||
"You've exceeded the 10 machine limit for the port fowarding service. Please remove other machines before trying to add this machine.".to_string(),
|
||||
"You have exceeded a limit for the port fowarding service. Please remove other machines before trying to add this machine.".to_string(),
|
||||
)));
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user