NestJS-க்கு ஒரு built-in exception layer உள்ளது, இது கையாளப்படாத errors-ஐ தானாகவே catch செய்து அவற்றை சரியான HTTP responses ஆக மாற்றுகிறது. நீங்கள் exceptions-ஐ throw செய்வதன் மூலம் (பெரும்பாலும் built-in HTTP exception classes) errors-ஐ சமிக்ஞை செய்கிறீர்கள், மற்றும் Nest அவற்றை சரியான status code-உடன் கட்டமைக்கப்பட்ட JSON responses ஆக format செய்கிறது.
Built-in HTTP exceptions-ஐ throw செய்தல்
{ , , } ;
()
() {
user = ..(id);
(!user) {
();
}
user;
}
