[mcp] Fix bailout loc (#32931)

Use the correct loc line numbers and not [Object:object]
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32931).
* #32932
* __->__ #32931
* #32930
* #32929
* #32928
This commit is contained in:
lauren 2025-04-16 17:49:15 -04:00 committed by GitHub
parent 3e04b2a214
commit 3c75bf21dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -283,7 +283,7 @@ server.tool(
if (typeof err.loc !== 'symbol') {
return {
type: 'text' as const,
text: `React Compiler bailed out: ${err.message}@${err.loc.start}:${err.loc.end}`,
text: `React Compiler bailed out:\n\n${err.message}@${err.loc.start.line}:${err.loc.end.line}`,
};
}
return null;