fixing throw error message

This commit is contained in:
Warunee Tamkoo 2025-04-25 09:15:26 +07:00
parent a38adb9598
commit 1a6dc0214e
12 changed files with 622 additions and 1325 deletions

View file

@ -70,7 +70,7 @@ export class SurveyController extends Controller {
} catch (error: any) {
if (error instanceof HttpError) {
throw error;
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error);
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error.message);
}
}
@ -107,7 +107,7 @@ export class SurveyController extends Controller {
} catch (error: any) {
if (error instanceof HttpError) {
throw error;
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error);
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error.message);
}
}
@ -183,7 +183,7 @@ export class SurveyController extends Controller {
} catch (error: any) {
if (error instanceof HttpError) {
throw error;
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error);
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error.message);
}
// await new permission().PermissionUpdate(request, "SYS_PROBATION");
}