kopia lustrzana https://github.com/c9/core
white list error keys
fixes https://trello.com/c/UpvPmchx/5-workspace-creation-shows-hibernate-or-migrate-screenpull/199/head
rodzic
a8f85c258c
commit
1d7cab3a3c
|
@ -118,9 +118,19 @@ function plugin(options, imports, register) {
|
||||||
message: err.message,
|
message: err.message,
|
||||||
hostname: options.hostname,
|
hostname: options.hostname,
|
||||||
scope: options.scope,
|
scope: options.scope,
|
||||||
stack: stack,
|
stack: stack
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var allowedErrorKeys = [
|
||||||
|
"message", "projectState", "premium", "retryIn", "progress",
|
||||||
|
"oldHost", "blocked"
|
||||||
|
];
|
||||||
|
|
||||||
|
allowedErrorKeys.forEach(function(key) {
|
||||||
|
if (err.hasOwnProperty(key))
|
||||||
|
error[key] = err[key];
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JSON.stringify(error);
|
JSON.stringify(error);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue