bugfix: appointment hours now use the client timezone on UTC servers.
Logical API errors throw stable codes so users see translated messages instead of a generic bad request. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { BadRequestException } from '@nestjs/common';
|
||||
import { HttpStatus } from '@nestjs/common';
|
||||
import { AppException, ErrorCode } from '../../common/errors';
|
||||
import { normalizeTeeth } from './treatment.utils';
|
||||
|
||||
export type LabCaseProsthesisLink = {
|
||||
@@ -28,9 +29,7 @@ export function assertCompleteToothProsthesisMap(labCase: {
|
||||
for (const tooth of teeth) {
|
||||
const key = `${link.treatmentDetailId}:${tooth}`;
|
||||
if (!prosthesisByKey.has(key)) {
|
||||
throw new BadRequestException(
|
||||
`Each tooth must have a prosthesis type before sending (missing tooth ${tooth})`,
|
||||
);
|
||||
throw new AppException(ErrorCode.TREATMENT_TOOTH_PROSTHESIS_INCOMPLETE, HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user