Is it possible to send error codes in nestjs other than 200? I attempted to inject the response object into a method, but could not find a way to send an error.
save(@Body() body: any, @Res() response: Response): string {
console.log("posting...")
console.log(body)
return "saving " + JSON.stringify(body)
}
The code above sends the body with a status code in the 20X range, but I need to be able to send different status codes like 400 or 500.