Skip to content

Commit f9b17ba

Browse files
authored
Merge pull request alexmojaki#178 from alexmojaki/fixes
Fixes
2 parents 2169651 + 0ae7dc0 commit f9b17ba

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

core/workers/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ def __getattr__(self, item):
1414
def write(self, s):
1515
if not s:
1616
return
17-
# TODO limit output length
17+
18+
if isinstance(s, bytes):
19+
s = s.decode("utf8", "replace")
20+
1821
self.output.parts.append(
1922
dict(text=s, color=self.color)
2023
)

frontend/src/store.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@ import * as Sentry from "@sentry/react";
1414
const sentryDsn = process.env.REACT_APP_SENTRY_DSN;
1515
if (sentryDsn) {
1616
console.log('Configuring sentry');
17-
Sentry.init({dsn: sentryDsn, normalizeDepth: 5});
17+
Sentry.init({
18+
dsn: sentryDsn,
19+
normalizeDepth: 5,
20+
beforeBreadcrumb(breadcrumb, hint) {
21+
const {message} = breadcrumb;
22+
if (message.includes("prev state") || message.includes("next state")) {
23+
return null;
24+
}
25+
return breadcrumb;
26+
},
27+
});
1828
}
1929

2030
const {delegateReducer} = redact("root");
@@ -30,16 +40,14 @@ const reducer = delegateReducer(
3040
// noinspection JSUnresolvedVariable
3141
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
3242

33-
const sentryReduxEnhancer = Sentry.createReduxEnhancer({});
34-
3543
export const store = createStore(
3644
reducer,
3745
composeEnhancers(
3846
applyMiddleware(
3947
thunk,
4048
logger,
4149
),
42-
sentryReduxEnhancer)
50+
)
4351
);
4452

4553
dispatcher.store = store;

0 commit comments

Comments
 (0)