mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +9703 from c9/fix-restore-screen
white list error keys
This commit is contained in:
commit
c01d232128
@ -115,11 +115,20 @@ 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user