Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Server-side exceptions are not recorded when deployed to Vercel #9

Closed
BethanyBerkowitz opened this issue Jan 3, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@BethanyBerkowitz
Copy link
Contributor

When I deploy to Vercel, I can't get server-side errors to show up in Honeybadger. All the server pages give me a 404. The Vercel log looks like this:
Screen Shot 2022-12-28 at 10 49 57 AM
So it appears that the function is getting called and erroring as I'd expect (500) but then displaying a 404. I don't yet understand why the "Edge Status" differs from the "Function Status".

I did confirm that there's nothing wrong with the routing, by adding another page within the /server folder that does not throw an error. That page loads fine on Vercel, so it's definitely related to error handling and not a true 404.

_error.js is getting called, however it's getting called for the 404, not the 500. The err object is null.
Screen Shot 2022-12-29 at 9 55 36 AM

Based on comments from @subzero10 I do not think these Vercel issues are new.

@subzero10
Copy link
Member

subzero10 commented Jan 4, 2023

Hey @BethanyBerkowitz, I remember not being able to get server errors on Honeybadger, but I'm pretty sure I didn't face this problem. I don't even remember if I was running the example app as an Edge Function; I think it was a standard Serverless function.

Could it be a caching issue, considering that vercel's edge network is all about latency and performance?
What if you try making that route return a hello world message, see that it works and then changing it back to throw an error?

Finally, have you looked into your function's logs in Vercel?

@BethanyBerkowitz
Copy link
Contributor Author

BethanyBerkowitz commented Jan 4, 2023

Hey @BethanyBerkowitz, I remember not being able to get server errors on Honeybadger, but I'm pretty sure I didn't face this problem. I don't even remember if I was running the example app as an Edge Function; I think it was a standard Serverless function.

Could it be a caching issue, considering that vercel's edge network is all about latency and performance? What if you try making that route return a hello world message, see that it works and then changing it back to throw an error?

Finally, have you looked into your function's logs in Vercel?

@subzero10 yes, the screenshot above is from the function's logs. I don't really understand Vercel's functions vs edge functions, and I definitely don't know why the behavior is different on Vercel than locally or on Heroku. I sent a support ticket to Vercel with a very minimal reproduction of the issue, so I'm hoping they will clarify in the next couple days.

I also did make sure that the routing worked correctly when the function did not error.

@subzero10
Copy link
Member

We have an issue for the nextjs package that should solve this, so I will close this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants