mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 14:43:07 +02:00
define APIError
This commit is contained in:
parent
1cfa30b982
commit
c7d5da4ec5
1 changed files with 8 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue