diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-05-16 11:25:03 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-05-16 11:25:03 +0900 |
| commit | c7d5da4ec5fbaff51d42919b8c93479ceeb53b24 (patch) | |
| tree | 9f003a3896cf58600bb9e3b4384188c8d7afb218 | |
| parent | rename (diff) | |
| download | misskey-c7d5da4ec5fbaff51d42919b8c93479ceeb53b24.tar.gz misskey-c7d5da4ec5fbaff51d42919b8c93479ceeb53b24.tar.bz2 misskey-c7d5da4ec5fbaff51d42919b8c93479ceeb53b24.zip | |
define APIError
| -rw-r--r-- | src/api.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/api.ts b/src/api.ts index 87f862994e..103aa5d890 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,5 +1,13 @@ import { Endpoints } from './endpoints'; +export type APIError = { + id: string; + code: string; + message: string; + kind: 'client' | 'server'; + info: Record<string, any>; +}; + export function request<E extends keyof Endpoints>( origin: string, endpoint: E, |