kopia lustrzana https://github.com/c9/core
Merge pull request +9703 from c9/fix-restore-screen
white list error keyspull/199/head
commit
c01d232128
|
@ -115,12 +115,21 @@ function plugin(options, imports, register) {
|
|||
if (/json/.test(accept)) {
|
||||
var error = {
|
||||
code: statusCode,
|
||||
message: err.message,
|
||||
hostname: options.hostname,
|
||||
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 {
|
||||
JSON.stringify(error);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue