Skip to content

Commit

Permalink
Merge pull request #11 from pagopa/feat-add-call-error-log
Browse files Browse the repository at this point in the history
Feat add call error log
  • Loading branch information
alessio-cialini authored Dec 12, 2024
2 parents 5950902 + 5bc33f1 commit 21220d6
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pagopa-mbd-service
description: Microservice that handles services for eBollo
type: application
version: 0.95.0
appVersion: 1.0.3
version: 0.96.0
appVersion: 1.0.1-3-feat-add-call-error-log
dependencies:
- name: microservice-chart
version: 7.1.1
Expand Down
3 changes: 2 additions & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: "pagopa-mbd-service"
image:
repository: ghcr.io/pagopa/pagopa-mbd-service
tag: "1.0.3"
tag: "1.0.1-3-feat-add-call-error-log"
pullPolicy: Always
livenessProbe:
handlerType: httpGet
Expand Down Expand Up @@ -92,6 +92,7 @@ microservice-chart:
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'app-insight-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
DEMAND_PAYMENT_SUBKEY: 'apikey-node-for-psp'
CART_SUBKEY: 'apikey-checkout-carts'
PAYMENT_RECEIPT_SUBKEY: 'apikey-gpd-payments'
Expand Down
3 changes: 2 additions & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: "pagopa-mbd-service"
image:
repository: ghcr.io/pagopa/pagopa-mbd-service
tag: "1.0.3"
tag: "1.0.1-3-feat-add-call-error-log"
pullPolicy: Always
livenessProbe:
handlerType: httpGet
Expand Down Expand Up @@ -92,6 +92,7 @@ microservice-chart:
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'app-insight-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
DEMAND_PAYMENT_SUBKEY: 'apikey-node-for-psp'
CART_SUBKEY: 'apikey-checkout-carts'
PAYMENT_RECEIPT_SUBKEY: 'apikey-gpd-payments'
Expand Down
3 changes: 2 additions & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: "pagopa-mbd-service"
image:
repository: ghcr.io/pagopa/pagopa-mbd-service
tag: "1.0.3"
tag: "1.0.1-3-feat-add-call-error-log"
pullPolicy: Always
livenessProbe:
handlerType: httpGet
Expand Down Expand Up @@ -92,6 +92,7 @@ microservice-chart:
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'app-insight-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
DEMAND_PAYMENT_SUBKEY: 'apikey-node-for-psp'
CART_SUBKEY: 'apikey-checkout-carts'
PAYMENT_RECEIPT_SUBKEY: 'apikey-gpd-payments'
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "mbd-service",
"description": "MBD Service",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "1.0.3"
"version": "1.0.1-3-feat-add-call-error-log"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>it.gov.pagopa.ebollo</groupId>
<artifactId>mbd-service</artifactId>
<version>1.0.3</version>
<version>1.0.1-3-feat-add-call-error-log</version>
<name>MBD Service</name>
<description>MBD Service</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ public Mono<DemandPaymentNoticeResponse> demandPaymentNotice(DemandPaymentNotice
.bodyToMono(Envelope.class).map(item -> {
if (item.getBody() == null || item.getBody().getDemandPaymentNoticeResponse() == null ||
StOutcome.KO.equals(item.getBody().getDemandPaymentNoticeResponse().getOutcome())) {
throw new RuntimeException("Encountered KO while calling demandPayment");
throw new RuntimeException("Encountered KO while calling demandPayment " +
(item.getBody() != null && item.getBody().getDemandPaymentNoticeResponse() != null &&
item.getBody().getDemandPaymentNoticeResponse().getFault() != null ?
item.getBody().getDemandPaymentNoticeResponse().getFault().getFaultCode() + " - "
+ item.getBody().getDemandPaymentNoticeResponse().getFault().getDescription() : "")
);
}
return item.getBody().getDemandPaymentNoticeResponse();
}).onErrorMap(e -> new WebClientException(e.getMessage(), e));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ public class MbdServiceImpl implements MbdService {
public MbdServiceImpl(
Validator validator, ReactiveClient reactiveSoapClient,
Jaxb2Marshaller jaxb2Marshaller,
@Value("mbd.link.baseUrl")
@Value("${mbd.link.baseUrl}")
String mdbLinkBaseUrl,
@Value("mbd.mapper.idPsp")
@Value("${mbd.mapper.idPsp}")
String idPsp,
@Value("mbd.mapper.idBrokerPsp")
@Value("${mbd.mapper.idBrokerPsp}")
String idBrokerPsp,
@Value("mbd.mapper.channelId")
@Value("${mbd.mapper.channelId}")
String channelId) {
this.validator = validator;
this.reactiveSoapClient = reactiveSoapClient;
Expand Down

0 comments on commit 21220d6

Please sign in to comment.