From c7d5da4ec5fbaff51d42919b8c93479ceeb53b24 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 16 May 2021 11:25:03 +0900 Subject: [PATCH] define APIError --- src/api.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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; +}; + export function request( origin: string, endpoint: E,