mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
parent
824bcbfd99
commit
79803b830c
3 changed files with 15 additions and 31 deletions
|
@ -200,8 +200,7 @@ export class Router<Context extends RequestHandlerContextBase = RequestHandlerCo
|
|||
try {
|
||||
kibanaRequest = CoreKibanaRequest.from(request, routeSchemas);
|
||||
} catch (error) {
|
||||
this.log.error(`400 Bad Request - ${request.path}`, {
|
||||
error,
|
||||
this.log.error(`400 Bad Request`, {
|
||||
http: { response: { status_code: 400 } },
|
||||
});
|
||||
|
||||
|
@ -217,8 +216,7 @@ export class Router<Context extends RequestHandlerContextBase = RequestHandlerCo
|
|||
|
||||
// forward 401 errors from ES client
|
||||
if (isElasticsearchUnauthorizedError(error)) {
|
||||
this.log.error(`401 Unauthorized - ${request.path}`, {
|
||||
error,
|
||||
this.log.error(`401 Unauthorized`, {
|
||||
http: { response: { status_code: 401 } },
|
||||
});
|
||||
return hapiResponseAdapter.handle(
|
||||
|
@ -227,8 +225,7 @@ export class Router<Context extends RequestHandlerContextBase = RequestHandlerCo
|
|||
}
|
||||
|
||||
// return a generic 500 to avoid error info / stack trace surfacing
|
||||
this.log.error(`500 Server Error - ${request.path}`, {
|
||||
error,
|
||||
this.log.error(`500 Server Error`, {
|
||||
http: { response: { status_code: 500 } },
|
||||
});
|
||||
return hapiResponseAdapter.toInternalError();
|
||||
|
|
|
@ -578,9 +578,8 @@ describe('Handler', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: unexpected error],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -625,9 +624,8 @@ describe('Handler', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: Unauthorized],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -655,9 +653,8 @@ describe('Handler', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: Unexpected result from Route Handler. Expected KibanaResponse, but given: string.],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -700,9 +697,8 @@ describe('Handler', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"400 Bad Request - /",
|
||||
"400 Bad Request",
|
||||
Object {
|
||||
"error": [Error: [request query.page]: expected value of type [number] but got [string]],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 400,
|
||||
|
@ -1185,9 +1181,8 @@ describe('Response factory', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: expected 'location' header to be set],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -1599,9 +1594,8 @@ describe('Response factory', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: Unexpected Http status code. Expected from 400 to 599, but given: 200],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -1676,9 +1670,8 @@ describe('Response factory', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: expected 'location' header to be set],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -1824,9 +1817,8 @@ describe('Response factory', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: expected error message to be provided],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -1858,9 +1850,8 @@ describe('Response factory', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: expected error message to be provided],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -1891,9 +1882,8 @@ describe('Response factory', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: options.statusCode is expected to be set. given options: undefined],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
@ -1924,9 +1914,8 @@ describe('Response factory', () => {
|
|||
expect(loggingSystemMock.collect(logger).error).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"500 Server Error - /",
|
||||
"500 Server Error",
|
||||
Object {
|
||||
"error": [Error: Unexpected Http status code. Expected from 100 to 599, but given: 20.],
|
||||
"http": Object {
|
||||
"response": Object {
|
||||
"status_code": 500,
|
||||
|
|
|
@ -34,9 +34,7 @@ export class DefaultSLOInstaller implements SLOInstaller {
|
|||
await this.sloResourceInstaller.ensureCommonResourcesInstalled();
|
||||
await this.sloSummaryInstaller.installAndStart();
|
||||
} catch (error) {
|
||||
this.logger.error('Failed to install SLO common resources and summary transforms', {
|
||||
error,
|
||||
});
|
||||
this.logger.error('Failed to install SLO common resources and summary transforms');
|
||||
} finally {
|
||||
this.isInstalling = false;
|
||||
clearTimeout(installTimeout);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue