From 856ba7598e7b02b38293817decdc4f81f064ae14 Mon Sep 17 00:00:00 2001 From: Yordan Stoykov Date: Thu, 20 Jan 2022 12:37:47 +0200 Subject: [PATCH] Updated log4j libraries, and extensionList err code, added status endpoint --- ...onnectors-camel-common-1.1.1-SNAPSHOT.jar} | Bin 13920 -> 14845 bytes core-connector/pom.xml | 2 +- .../processor/CustomErrorProcessor.java | 6 +++--- .../client/router/SendMoneyRouter.java | 6 +++--- .../client/router/TransfersRouter.java | 2 +- core-connector/src/main/resources/log4j2.xml | 2 +- pom.xml | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) rename core-connector/lib/{core-connectors-camel-common-1.1.0-SNAPSHOT.jar => core-connectors-camel-common-1.1.1-SNAPSHOT.jar} (68%) diff --git a/core-connector/lib/core-connectors-camel-common-1.1.0-SNAPSHOT.jar b/core-connector/lib/core-connectors-camel-common-1.1.1-SNAPSHOT.jar similarity index 68% rename from core-connector/lib/core-connectors-camel-common-1.1.0-SNAPSHOT.jar rename to core-connector/lib/core-connectors-camel-common-1.1.1-SNAPSHOT.jar index 9fbf5a50e62de8df601bfdd2faeb929bd5fdbe1b..fc95223c2a54959b28cfac979a1b1b102ef7026a 100644 GIT binary patch delta 2293 zcmZuy3piAH8$V}e#4u*ixHKAO+-6*wt7~N|Yfxg`)}?Hy{gN+oPrB?>Zf#09RAiS# zNm-ZSBf?tj>d7raqCOIt4@+xBxwK~-m(BB?=Q-#9d*A>2d*An*|9Rhcz<)6m?_i6@ zNCV)0_-?R(+)(<6k608FBLj1Uk5K!-WtC78LzY4i9p|%xt`ZF} zh^|_t4UM40t==n)zsPoy^5V!52Pt9aQ2=lW4oiccfyx3Tzi;3y{lX#{NBn(4L$5m9 zId?h`%?tP5Dvd3)xG$Z3-a<8}j^JXzN@z8$cX+;qXdO}Lms4kW-!A(Ne@cCzHC0u) zQkT1Zh%jYs_WA|}6kRzPJXsadx?{F~Iz6+tW)TP?KQP02>&5wb5(kr|xOzuF(Z527N!1A98GR|5S=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M|mwvmb}-x64kdctBc7?(R_2HR>4AqP%1q;8eO10cYhy)Dn(^nC8kgjLd^eTic%NjujPZ77#P>qwV1;ZBRSV56^U9X* z-ps43%Pa^=V)2fA^ZS6wZz&KbPHxl+n|#xfuimxSm%G_Oz~#NuKj#C*O`MmSA1n;W ztbW0+@nz1jtsHq_*EGJ|Hy82JKP+8w_=!8m0X--E`T3QF(kv67_J{C4Si1Gnj8%6+ zubo)-a*6I5!JBM*dPK4o_v(dI-@SkP@>=1W-I;UG*S_U64cf0)bxcV8ZKt9u#{=b$ zlLRJS>V0e>&v)+l`xeK)qEBTHEvb9N9^lQ$B*KiyCzE{*jlqd{a*LrIB&{7YgyxJN zhUO3vVWMGH@TFL>} zz`(GiarNYlCgKneoH3DN`pG%jaB*!jBZ!L<&7_!` zWPsvgli$clPF`ci0}>j9eL%4nYLgkY zgeSi>=Yr_}4HOeqpRA{4#fO#-;w_|@GC?vHllNH4PQGBlqW~{(fbo|m!N3rO;+cbs-adapters-exception-handling 1.1.0-SNAPSHOT system - ${basedir}/lib/core-connectors-camel-common-1.1.0-SNAPSHOT.jar + ${basedir}/lib/core-connectors-camel-common-1.1.1-SNAPSHOT.jar org.json diff --git a/core-connector/src/main/java/com/modusbox/client/processor/CustomErrorProcessor.java b/core-connector/src/main/java/com/modusbox/client/processor/CustomErrorProcessor.java index 68066ac..6ed6905 100644 --- a/core-connector/src/main/java/com/modusbox/client/processor/CustomErrorProcessor.java +++ b/core-connector/src/main/java/com/modusbox/client/processor/CustomErrorProcessor.java @@ -94,8 +94,8 @@ public void process(Exchange exchange) throws Exception { errorMessage = errorResponse.getString("description"); reasonText = "{ \"statusCode\": \"" + statusCode + "\"," + "\"message\": \"" + errorMessage + "\"," + - "\"localeMessage\": \"" + errorMessageLocale + "\"," + - "\"detailedDescription\": \"" + detailedDescription + "\"" + + "\"localeMessage\": \"" + errorMessageLocale + "\"" + // + "\"," + +// "\"detailedDescription\": \"" + detailedDescription + "\"" + "} "; } } @@ -104,7 +104,7 @@ public void process(Exchange exchange) throws Exception { "Processing the exception at CustomErrorProcessor", null, null, exception.getMessage()); } - System.out.println("Reason Text: " + reasonText); + System.out.println("Erro reason text: " + reasonText); exchange.getMessage().setHeader(Exchange.HTTP_RESPONSE_CODE, httpResponseCode); exchange.getMessage().setHeader(Exchange.CONTENT_TYPE, "application/json"); exchange.getMessage().setBody(reasonText); diff --git a/core-connector/src/main/java/com/modusbox/client/router/SendMoneyRouter.java b/core-connector/src/main/java/com/modusbox/client/router/SendMoneyRouter.java index 153535b..022ddf7 100644 --- a/core-connector/src/main/java/com/modusbox/client/router/SendMoneyRouter.java +++ b/core-connector/src/main/java/com/modusbox/client/router/SendMoneyRouter.java @@ -32,7 +32,7 @@ public class SendMoneyRouter extends RouteBuilder { .register(); private final RouteExceptionHandlingConfigurer exceptionHandlingConfigurer = new RouteExceptionHandlingConfigurer(); - private final CorsFilter corsFilter = new CorsFilter(); +// private final CorsFilter corsFilter = new CorsFilter(); public void configure() { // Add our global exception handling strategy @@ -139,7 +139,7 @@ public void configure() { "'Tracking the response', 'Verify the response', null)") // Add CORS headers - .process(corsFilter) +// .process(corsFilter) .process(exchange -> { ((Histogram.Timer) exchange.getProperty(TIMER_NAME_PUT)).observeDuration(); // stop Prometheus Histogram metric @@ -156,7 +156,7 @@ public void configure() { // Conditional whether errorMessage was found .choice() - .when(simple("${body.get('statusCode')} == '3241'")) + .when(simple("${body.get('statusCode')} == '3242'")) .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(409)) .end() ; diff --git a/core-connector/src/main/java/com/modusbox/client/router/TransfersRouter.java b/core-connector/src/main/java/com/modusbox/client/router/TransfersRouter.java index d59c876..e0f74f6 100644 --- a/core-connector/src/main/java/com/modusbox/client/router/TransfersRouter.java +++ b/core-connector/src/main/java/com/modusbox/client/router/TransfersRouter.java @@ -80,7 +80,7 @@ public void configure() { .setHeader(Exchange.HTTP_METHOD, constant("GET")) .to("bean:customJsonMessage?method=logJsonMessage('info', ${header.X-CorrelationId}, " + - "'Calling Hub API, get transfers, GET {{dfsp.host}}', " + + "'Calling Hub API, get transfers, GET {{ml-conn.outbound.host}}', " + "'Tracking the request', 'Track the response', 'Input Payload: ${body}')") .toD("{{ml-conn.outbound.host}}/transfers/${header.transferId}?bridgeEndpoint=true&throwExceptionOnFailure=false") .unmarshal().json() diff --git a/core-connector/src/main/resources/log4j2.xml b/core-connector/src/main/resources/log4j2.xml index 5123ae3..b5bd1e1 100644 --- a/core-connector/src/main/resources/log4j2.xml +++ b/core-connector/src/main/resources/log4j2.xml @@ -1,5 +1,5 @@ - + diff --git a/pom.xml b/pom.xml index 407eb54..a162da9 100644 --- a/pom.xml +++ b/pom.xml @@ -116,7 +116,7 @@ - + org.apache.logging.log4j log4j-api