feat(client): add yas error report
Showing
2 changed files
with
2 additions
and
1 deletions
@@ -57,7 +57,7 @@ function handleClientError(scope, item) { | @@ -57,7 +57,7 @@ function handleClientError(scope, item) { | ||
57 | _.merge(data, { | 57 | _.merge(data, { |
58 | measurement: 'error-report', | 58 | measurement: 'error-report', |
59 | tags: { | 59 | tags: { |
60 | - type: 'client' | 60 | + type: item.tp || 'client' |
61 | }, | 61 | }, |
62 | fields: Object.assign({ | 62 | fields: Object.assign({ |
63 | message: item.msg, | 63 | message: item.msg, |
@@ -87,6 +87,7 @@ module.exports = (req, res, next) => { | @@ -87,6 +87,7 @@ module.exports = (req, res, next) => { | ||
87 | } | 87 | } |
88 | 88 | ||
89 | switch (item.tp) { | 89 | switch (item.tp) { |
90 | + case 'yas_err': | ||
90 | case 'err': { | 91 | case 'err': { |
91 | handleClientError(scope, item); | 92 | handleClientError(scope, item); |
92 | break; | 93 | break; |
-
Please register or login to post a comment