astral-sh/ruff · error
Received exit notification before a shutdown request
Error message
Received exit notification before a shutdown request
What it means
Error "Received exit notification before a shutdown request" thrown in astral-sh/ruff.
Source
Thrown at crates/ruff_server/src/server/main_loop.rs:66
"Received request after server shutdown was requested, discarding"
);
client.respond_err(
req.id,
lsp_server::ResponseError {
code: lsp_server::ErrorCode::InvalidRequest as i32,
message: "Shutdown already requested".to_owned(),
data: None,
},
)?;
continue;
}
api::request(req)
}
Message::Notification(notification) => {
if notification.method == lsp_types::ExitNotification::METHOD.as_str() {
if !self.session.is_shutdown_requested() {
return Err(anyhow!(
"Received exit notification before a shutdown request"
));
}
tracing::debug!("Received exit notification, exiting");
return Ok(());
}
api::notification(notification)
}
// Handle the response from the client to a server request
Message::Response(response) => {
if let Some(handler) = self
.session
.request_queue_mut()
.outgoing_mut()
.complete(&response.id)View on GitHub (pinned to 672bb4edf0)
When it happens
Trigger: Thrown at crates/ruff_server/src/server/main_loop.rs:66 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astral-sh/ruff@672bb4edf0 (2026-08-16).
Data as JSON: /api/errors/e94d6838b11a04fa.
Report an issue: GitHub.