Seems like it should be simple.
Trying:
res.status(500).send({ error: "That type already exists." })
Gets me:
TypeError: res.status is not a function
This is in sapper, not sure if that makes a diff.
Seems like it should be simple.
Trying:
res.status(500).send({ error: "That type already exists." })
Gets me:
TypeError: res.status is not a function
This is in sapper, not sure if that makes a diff.
Copyright © 2021 Jogjafile Inc.
According to the docs, you use
res.statusCode = 500, or if you're throwing an error in a middleware, you'd useerr.code = 500.