improve display of GetSessionError
This commit is contained in:
parent
52c949e396
commit
486001b584
@ -57,8 +57,12 @@ where
|
||||
E: Error,
|
||||
M: serde::ser::SerializeMap,
|
||||
{
|
||||
let src = err.source().map(|s| format!("{s}"));
|
||||
map.serialize_entry("source", &src)
|
||||
let msg = err.source().map(|s| format!("{s}"));
|
||||
map.serialize_entry("msg", &msg)?;
|
||||
map.serialize_entry("code", &None::<&str>)?;
|
||||
map.serialize_entry("source", &None::<&str>)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,14 +39,16 @@
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
if (e.code === "GetSession") {
|
||||
let root = getRootCause(e);
|
||||
window.error = e;
|
||||
const root = getRootCause(e);
|
||||
if (e.code === 'GetSession' && root.code) {
|
||||
errorMsg = `Error response from AWS (${root.code}): ${root.msg}`;
|
||||
}
|
||||
else {
|
||||
errorMsg = e.msg;
|
||||
}
|
||||
|
||||
// if the alert already existed, shake it
|
||||
if (alert) {
|
||||
alert.shake();
|
||||
}
|
||||
|
@ -34,8 +34,8 @@
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
if (e.code === 'GetSession') {
|
||||
let root = getRootCause(e);
|
||||
const root = getRootCause(e);
|
||||
if (e.code === 'GetSession' && root.code) {
|
||||
errorMsg = `Error response from AWS (${root.code}): ${root.msg}`;
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user