I always have doubts regarding the handling of errors, I understand that when using a try and catch in a call, if the error occurs, the catch captures it and you handle the error, I wanted to know if there is something that can be done with nest to improve these handling I created something like a global mapper of error instances and I only use try and catch in the controller to capture errors that may occur. Does this seem good or unnecessary ```ts
export class ExceptionMapperService {
static mapToHttpException(error: Error): { status: number; message: string } {
if (error instanceof CategoryNotFoundException) {
throw error;
}
if (error instanceof FileStorageGetUrlException) {
throw error;
}
if (error instanceof FileStorageRemoveException) {
throw error;
}
if (error instanceof FileStorageUploadException) {
throw error;
}
return {
status: HttpStatus.INTERNAL_SERVER_ERROR,
message: 'Erro interno do servidor',
};
}
}