This commit is contained in:
David Arranz 2026-05-22 20:24:59 +02:00
parent 567c9d9730
commit f23ee948f4
3 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import { ApiError } from "./api-error";
export class InternalApiError extends ApiError { export class InternalApiError extends ApiError {
constructor(detail: string, title?: string) { constructor(detail: string, title?: string) {
console.trace("Internal server error:", detail);
super({ super({
status: 500, status: 500,
title: title ?? "Internal Server Error", title: title ?? "Internal Server Error",

View File

@ -178,6 +178,7 @@ export abstract class ExpressController {
} }
protected internalServerError(message?: string) { protected internalServerError(message?: string) {
console.trace("Internal server error:", message);
return this.handleApiError(new InternalApiError(message ?? "Internal Server Error")); return this.handleApiError(new InternalApiError(message ?? "Internal Server Error"));
} }

View File

@ -1,4 +1,5 @@
import { PageHeader } from "@erp/core/components"; import { PageHeader } from "@erp/core/components";
import { UnsavedChangesProvider } from "@erp/core/hooks";
import { AppContent, AppHeader } from "@repo/rdx-ui/components"; import { AppContent, AppHeader } from "@repo/rdx-ui/components";
import { Button } from "@repo/shadcn-ui/components"; import { Button } from "@repo/shadcn-ui/components";
import { PlusIcon } from "lucide-react"; import { PlusIcon } from "lucide-react";
@ -11,7 +12,7 @@ export const ProformaCreatePage = () => {
const navigate = useNavigate(); const navigate = useNavigate();
return ( return (
<> <UnsavedChangesProvider isDirty={true}>
<AppHeader> <AppHeader>
<PageHeader <PageHeader
description={t("pages.proformas.list.description")} description={t("pages.proformas.list.description")}
@ -42,6 +43,6 @@ export const ProformaCreatePage = () => {
</div> </div>
<div className="flex flex-1 flex-col gap-4 p-4">hola</div> <div className="flex flex-1 flex-col gap-4 p-4">hola</div>
</AppContent> </AppContent>
</> </UnsavedChangesProvider>
); );
}; };