diff --git a/ui/src/Services/API.ts b/ui/src/Services/API.ts index 9a6e4f93..0b784b7f 100644 --- a/ui/src/Services/API.ts +++ b/ui/src/Services/API.ts @@ -39,8 +39,8 @@ interface APIErrorResponse { data: unknown; } -export interface APIError { - message?: string; +export interface APIError extends Error { + message: string; code?: string; response?: APIErrorResponse; } diff --git a/ui/src/types.ts b/ui/src/types.ts index 64eee51f..5e14ec4e 100644 --- a/ui/src/types.ts +++ b/ui/src/types.ts @@ -194,7 +194,7 @@ export interface InstanceLabel { types: SimpleType[]; id: UUID; name: string; - error: Error; + error?: Error; } export type Fields = Record; // by fieldName