show error in create reserve dialog
This commit is contained in:
parent
b47522c11b
commit
43575b5919
@ -371,7 +371,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
|
|||||||
if (this.statusString()) {
|
if (this.statusString()) {
|
||||||
return (
|
return (
|
||||||
<p>
|
<p>
|
||||||
<strong style={{color: "red"}}>{i18n.str`A problem occured, see below. ${this.statusString()}`}</strong>
|
<strong style={{color: "red"}}>{this.statusString()}</strong>
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -515,12 +515,9 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
|
|||||||
console.dir(r);
|
console.dir(r);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("get exchange info rejected", e);
|
console.log("get exchange info rejected", e);
|
||||||
if (e.hasOwnProperty("httpStatus")) {
|
this.statusString(`Error: ${e.message}`);
|
||||||
this.statusString(`Error: request failed with status ${e.httpStatus}`);
|
// Re-try every 5 seconds as long as there is a problem
|
||||||
} else if (e.hasOwnProperty("errorResponse")) {
|
setTimeout(() => this.statusString() ? this.forceReserveUpdate() : undefined, 5000);
|
||||||
const resp = e.errorResponse;
|
|
||||||
this.statusString(`Error: ${resp.error} (${resp.hint})`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ async function dispatch(req: any, sender: any, sendResponse: any): Promise<void>
|
|||||||
try {
|
try {
|
||||||
sendResponse({
|
sendResponse({
|
||||||
error: "exception",
|
error: "exception",
|
||||||
hint: e.message,
|
message: e.message,
|
||||||
stack,
|
stack,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user