This commit is contained in:
syuilo
2021-11-18 23:36:04 +09:00
parent 73b5c12927
commit 318759cfa4
5 changed files with 13 additions and 15 deletions

View File

@@ -103,7 +103,7 @@ export const apiWithDialog = ((
) => {
const promise = api(endpoint, data, token);
promiseDialog(promise, null, (e) => {
dialog({
alert({
type: 'error',
text: e.message + '\n' + (e as any).id,
});
@@ -136,7 +136,7 @@ export function promiseDialog<T extends Promise<any>>(
if (onFailure) {
onFailure(e);
} else {
dialog({
alert({
type: 'error',
text: e
});