-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: Cannot set property message of [object Object] which has only a getter #205
Comments
Hi @wojtekmaj can you share your version of core tools and the "@azure/functions" npm package? If you have sample repro code, that would also be very helpful |
@ejizba @azure/functions was at 3.5.1 in the project I could reproduce that in. I don't think that's relevant though. I can now see that what was thrown from my function was not |
Okay I think I understand what's happening here. The ZodError type apparently makes the "message" property read-only and doesn't let us change the message. We'll look into this. If you need a workaround in the meantime, you could probably catch the error yourself and either log it or convert it to a more normal error type that we can handle |
I have just merged two PRs that should resolve this issue: Azure/azure-functions-nodejs-worker#732 and #220. When these changes are deployed, I will close out this issue. |
@castrodd Is the fix available on Azure yet? We are experiencing a similar problem and I'm not able to find any information on the currently deployed function-host versions. |
@sladkoff It actually just started rolling out and should finish in the next couple weeks. At least for Node.js, you could check our github releases here. Of course, commenting on a specific issue is also probably one of the best ways to get this info 🙂 Btw, if you're on Windows consumption and want to test it out today, I believe the East Asia and West Central US regions already have the fix. |
We're seeing a TypeError in this updated code that causes an unhandled promise rejection. Details in the PR: Azure/azure-functions-nodejs-worker#732 (comment). |
This PR should have fixed this issue: Azure/azure-functions-nodejs-worker#750 |
Facing the exact same thing, which took me quite some time to figure out what actually was wrong. Azure Functions Core Tools @azure/functions: 3.5.1 Is there any ETA, when this gets shipped? Currently working around by wrapping the causing logic in a try/catch and throwing a new I have prepared a simple repro here: https://github.com/earloc/repros-azure-functions-nodejs-library |
When attempting to run a function, which crashed on startup (for an unrelated reason), I got the following error:
instead of the actual error message that got thrown by my function.
worker-bundle.js:2:33509
corresponds to this line:so there's something wrong with the way errors are handled.
The text was updated successfully, but these errors were encountered: