mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
chore: move sdk to packages (#28350)
This commit is contained in:
parent
b4f719653f
commit
7837d40f57
24 changed files with 37 additions and 44 deletions
22
packages/sdk/src/fetch-errors.ts
Normal file
22
packages/sdk/src/fetch-errors.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { HttpError } from '@oazapfts/runtime';
|
||||
|
||||
export interface ApiValidationError {
|
||||
code: string;
|
||||
path: (string | number)[];
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ApiExceptionResponse {
|
||||
message: string;
|
||||
error?: string;
|
||||
statusCode: number;
|
||||
errors?: ApiValidationError[];
|
||||
}
|
||||
|
||||
export interface ApiHttpError extends HttpError {
|
||||
data: ApiExceptionResponse;
|
||||
}
|
||||
|
||||
export function isHttpError(error: unknown): error is ApiHttpError {
|
||||
return error instanceof HttpError;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue