|
|
@ -265,7 +265,13 @@ export default class MetaMetricsController { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
const callback = (err) => { |
|
|
|
const callback = (err) => { |
|
|
|
if (err) { |
|
|
|
if (err) { |
|
|
|
return reject(err) |
|
|
|
// The error that segment gives us has some manipulation done to it
|
|
|
|
|
|
|
|
// that seemingly breaks with lockdown enabled. Creating a new error
|
|
|
|
|
|
|
|
// here prevents the system from freezing when the network request to
|
|
|
|
|
|
|
|
// segment fails for any reason.
|
|
|
|
|
|
|
|
const safeError = new Error(err.message) |
|
|
|
|
|
|
|
safeError.stack = err.stack |
|
|
|
|
|
|
|
return reject(safeError) |
|
|
|
} |
|
|
|
} |
|
|
|
return resolve() |
|
|
|
return resolve() |
|
|
|
} |
|
|
|
} |
|
|
|