refacto: massive use of getMessageError

This commit is contained in:
Julien Froidefond
2025-02-27 14:26:48 +01:00
parent e76b849b17
commit 246c0c650a
26 changed files with 104 additions and 101 deletions

View File

@@ -1,7 +1,7 @@
import { NextResponse } from "next/server";
import { getServerCacheService, ServerCacheService } from "@/lib/services/server-cache.service";
import { ERROR_CODES } from "@/constants/errorCodes";
import { ERROR_MESSAGES } from "@/constants/errorMessages";
import { getErrorMessage } from "@/utils/errors";
export async function POST() {
try {
@@ -14,7 +14,7 @@ export async function POST() {
{
error: {
code: ERROR_CODES.CACHE.CLEAR_ERROR,
message: ERROR_MESSAGES[ERROR_CODES.CACHE.CLEAR_ERROR],
message: getErrorMessage(ERROR_CODES.CACHE.CLEAR_ERROR),
},
},
{ status: 500 }