enhance(frontend): エラー発生時のダイアログに詳細情報を載せる (MisskeyIO#543)
This commit is contained in:
parent
41ea486881
commit
daf297c9c0
7 changed files with 37 additions and 26 deletions
|
@ -11,15 +11,15 @@ export class ApiError extends Error {
|
|||
public id: string;
|
||||
public kind: string;
|
||||
public httpStatusCode?: number;
|
||||
public info?: any;
|
||||
public info?: Record<string, string>;
|
||||
|
||||
constructor(err: E, info?: any | null | undefined) {
|
||||
constructor(err: E, info?: Record<string, string> | null | undefined) {
|
||||
super(err.message);
|
||||
this.message = err.message;
|
||||
this.code = err.code;
|
||||
this.id = err.id;
|
||||
this.kind = err.kind ?? 'client';
|
||||
this.httpStatusCode = err.httpStatusCode;
|
||||
this.info = info;
|
||||
this.info = info ?? undefined;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue