How can i send error codes in nestjs apart from 200? i tried to inject response object in a method but there is no method to send error.
save(@Body() body: any, @Res() response: Response): string {
console.log("posting...")
console.log(body)
return "saving " + JSON.stringify(body)
}
the above code send body with 20X status i want to send different status code like 400 or 500.