Я запустил код в режиме отладки и понял, что нижеприведенное сообщение об ошибке появляется в пути error.exception.cause.errorMessage.typedValue.value.
{
"error": "authentication failed: Could not bind with your username/pw: LDAP Result Code 49 \"Invalid Credentials\": 80090308: LdapErr: DSID-0C090442, comment: AcceptSecurityContext error, data 52e, v3839\u0000"
}
Но когда я пытаюсь захватить значение
(read(error.exception.cause.errorMessage.typedValue.value,"application/json"))
в переменной, выдает ошибку ниже.
ERROR 2020-05-28 08:43:56,779 [[MuleRuntime].io.01: [proc-brain-usage-sync-batch].send-usage-data-to-brain.BLOCKING @164a6d7b] [event: 2ec6d1e1-a049-11ea-9b85-00059a3c7a00] org.mule.extension.jsonlogger.JsonLoggerExtension: Failed parsing field: content
org.mule.runtime.core.api.expression.ExpressionRuntimeException: "You called the function 'Value Selector' with these arguments:
1: String ("{\"error\":\"authentication failed: Could not bind with your username/pw: LD...)
2: Name ("value")
But it expects one of these combinations:
(Array, Name)
(Array, String)
(Date, Name)
(DateTime, Name)
(LocalDateTime, Name)
(LocalTime, Name)
(Object, Name)
(Object, String)
(Period, Name)
(Time, Name)
5| brainerror: write(error.exception.cause.errorMessage.typedValue.value, "application/json") default ""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Trace:
at write (line: 5, column: 20)
at main (line: 5, column: 14)" evaluating expression: "output application/json ---
{
usageMetadata: vars.usageMetadata,
attributes: attributes,
brainerror: write(error.exception.cause.errorMessage.typedValue.value, "application/json") default ""
}".
Caused by: org.mule.runtime.api.el.ExpressionExecutionException: You called the function 'Value Selector' with these arguments:
1: String ("{\"error\":\"authentication failed: Could not bind with your username/pw: LD...)
2: Name ("value")
But it expects one of these combinations:
(Array, Name)
(Array, String)
(Date, Name)
(DateTime, Name)
(LocalDateTime, Name)
(LocalTime, Name)
(Object, Name)
(Object, String)
(Period, Name)
(Time, Name)
5| brainerror: write(error.exception.cause.errorMessage.typedValue.value, "application/json") default ""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Как я могу зафиксировать значение в пути ' error.exception.cause.errorMessage.typedValue.value 'как мы фиксируем error.description?