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 { Injectable, BadRequestException, OnModuleInit } from '@nestjs/common';
|
||||
import { HttpStatus, Injectable, OnModuleInit } from '@nestjs/common';
|
||||
import { AppException, ErrorCode } from '../../common/errors';
|
||||
import { CatalogEntityKind } from '@prisma/client';
|
||||
import { PrismaService } from '../../../prisma/prisma.service';
|
||||
import {
|
||||
@@ -60,7 +61,7 @@ export class ProsthesisCatalogService implements OnModuleInit {
|
||||
assertKnownProsthesisType(code: string): void {
|
||||
this.ensureLoaded();
|
||||
if (!this.byCode.has(code)) {
|
||||
throw new BadRequestException(`Unknown prosthesis type: ${code}`);
|
||||
throw new AppException(ErrorCode.CATALOG_UNKNOWN_PROSTHESIS_TYPE, HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user