Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
if (data && data.stack) {
err.trace = data.stack.split('\n');
err.outterTrace = Hoek.displayStack(1);
}
else {
err.trace = Hoek.displayStack(1);
}
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Boom.internal = function (message, data) {
var err = new internals.Boom(500, message);
err.trace = Hoek.displayStack(1);
err.data = data;
err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
return err;
};
internals.Error.internal = function (message, data) {
var err = new internals.Error(500, message);
err.trace = Hoek.displayStack(1);
err.data = data;
err.toResponse = function () {
var response = {
code: 500,
payload: {
error: Http.STATUS_CODES[500],
code: 500,
message: 'An internal server error occurred' // Hide actual error from user
}
};
return response;
};