mirror of
https://github.com/immich-app/immich.git
synced 2025-11-11 08:53:08 +09:00
fix(web): fetch error reporting (#7391)
This commit is contained in:
15
open-api/typescript-sdk/fetch-errors.ts
Normal file
15
open-api/typescript-sdk/fetch-errors.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpError } from '@oazapfts/runtime';
|
||||
|
||||
export interface ApiExceptionResponse {
|
||||
message: string;
|
||||
error?: string;
|
||||
statusCode: number;
|
||||
}
|
||||
|
||||
export interface ApiHttpError extends HttpError {
|
||||
data: ApiExceptionResponse;
|
||||
}
|
||||
|
||||
export function isHttpError(error: unknown): error is ApiHttpError {
|
||||
return error instanceof HttpError;
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
export * from './fetch-client';
|
||||
export * from './fetch-errors';
|
||||
|
||||
Reference in New Issue
Block a user