diff --git a/app/utils/http/factory.ts b/app/utils/http/factory.ts index 3e77bc0..444597d 100644 --- a/app/utils/http/factory.ts +++ b/app/utils/http/factory.ts @@ -8,8 +8,8 @@ export type ApiResponse = { } /** Wraps API error responses, preserving the data field for field-level error handling */ -export class ApiError extends Error { - constructor(message: string, public data: unknown) { +export class ApiError extends Error { + constructor(message: string, public data: T) { super(message) this.name = 'ApiError' }