mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 04:22:07 +00:00
[cli][node] make error handling of edge functions consistent with serverless functions in vc dev (#8007)
When edge functions error, they were showing a basic text response instead of the error template. They were also sending a 502 status code instead of a 500. This PR makes the error handling of Edge Functions consistent with Serverless Functions when executed through `vc dev`. If we want to update the error templates themselves, we can do that in a separate PR. **Note:** Production currently treats Edge Function errors differently from Serverless Function errors, but that's a known issue that will be resolved. --- *I deleted the original outputs (terminal and browser screenshots) because they are out of date and added a lot of content to this page. See my latest comment for updated examples.*
This commit is contained in:
@@ -257,6 +257,10 @@ async function testFixture(directory, opts = {}, args = []) {
|
||||
dev.kill = async (...args) => {
|
||||
dev._kill(...args);
|
||||
await exitResolver;
|
||||
return {
|
||||
stdout,
|
||||
stderr,
|
||||
};
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user