You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/06/14 15:19:38 UTC
[skywalking-showcase] 01/01: Revert "Simulate errors for client-js (#45)"
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch revert-45-feat/case
in repository https://gitbox.apache.org/repos/asf/skywalking-showcase.git
commit cf50e4fb594b6c6781fcc1dffba1639967386176
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Tue Jun 14 23:19:32 2022 +0800
Revert "Simulate errors for client-js (#45)"
This reverts commit 9a6286657df36d48997339cf22a8db5e0ac13b4c.
---
services/app/ui/src/App.js | 6 +-----
services/app/ui/src/index.js | 23 -----------------------
2 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/services/app/ui/src/App.js b/services/app/ui/src/App.js
index 0f41e1d..835e312 100644
--- a/services/app/ui/src/App.js
+++ b/services/app/ui/src/App.js
@@ -27,11 +27,7 @@ function App() {
fetch("/homepage")
.then((res) => res.json())
.then((data) => setData(JSON.stringify(data)));
- // mock error
- const xhr = new XMLHttpRequest();
- xhr.open('post', '/test');
- xhr.send();
-}, []);
+ }, []);
return (
<div className="App">
diff --git a/services/app/ui/src/index.js b/services/app/ui/src/index.js
index abad8e0..0f86253 100644
--- a/services/app/ui/src/index.js
+++ b/services/app/ui/src/index.js
@@ -34,32 +34,9 @@ ClientMonitor.register({
traceTimeInterval: 2000,
});
-// promise error
-function foo() {
- Promise.reject({
- message: 'promise test',
- stack: 'promise error'
- });
- }
-foo();
-function timeout() {
- return new Promise((resolve, reject) => {
- setTimeout(() => Math.random() > 0.5 ?
- resolve() :
- reject({
- message: 'timeout test',
- stack: 2000
- }), 500)
- })
-}
-timeout();
-
ReactDOM.render(
<React.StrictMode>
<App/>
</React.StrictMode>,
document.getElementById('root')
);
-// js error
-const s = null;
-s.v;
\ No newline at end of file