Unverified Commit 8a4b0f16 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Turbopack: avoid crashing when server actions can't parse the file (#57424)

Introducting syntax errors in files throws an error in the server
actions parsing, which hides the actual syntax error reported

Closes WEB-1858
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent d11156c2
......@@ -240,10 +240,8 @@ async fn parse_actions(module: Vc<Box<dyn Module>>) -> Result<Vc<OptionActionMap
comments, program, ..
} = &*ecmascript_asset.parse().await?
else {
bail!(
"failed to parse action module '{id}'",
id = module.ident().to_string().await?
);
// The file might be be parse-able, but this is reported separately.
return Ok(OptionActionMap::none());
};
let Some(actions) = parse_server_actions(program, comments.clone()) else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment