Closed dimasanwaraziz closed 3 months ago
Hey 👋 ,
AppExpress
' syntax isn't completely same as express.js
but rather similar to what Appwrite's Functions have.
You can do this way -
response.json({ error: 'message' }, 500)
Hey @dimasanwaraziz, Is your issue resolved now?
Yes, I can use the another way like you say.
But nice to have if we have that feature same like express.
Yes, I can use the another way like you say.
But nice to have if we have that feature same like express.
A fair point but express.js
uses chaining which isn't what I'd prefer atm.
I would instead like to keep it as close to the Appwrite Function's behaviour.
For express 4.x status is
res.status(500).json({ error: 'message' })
But I see on this documentation the response not include with status.
So when implement same code when switching from express to appexpress, it's return error.