Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Sep 2, 2023
1 parent 1512504 commit 6866c54
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions shadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,14 @@ export class Shadow extends HTMLElement {
}
} catch (error) {
if (isString(jwt)) {
console.error(
`Received rpc error code ${error?.code} (${error?.message})${
error.data ? ":\n" + error.data : "."
}`,
);
if (error?.data) console.error(error.data);
removeJwt(this._jwtKeyName);
goHome();
} else {
throw new ShadowError(error.message);
}
const errorMessage =
`Received rpc error code ${error?.code} (${error?.message})${
error?.data ? ":\n" + error.data : "."
}`;
throw new ShadowError(errorMessage);
}
this._actuallyRender();
} else {
Expand Down

0 comments on commit 6866c54

Please sign in to comment.