update runner
This commit is contained in:
parent
f9084d6081
commit
c400768fb5
Binary file not shown.
@ -1,5 +1,6 @@
|
|||||||
package com.banesco.module.payment_status.domain.model;
|
package com.banesco.module.payment_status.domain.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -35,4 +36,8 @@ public class PaymentStatus {
|
|||||||
private String uuidPasskey;
|
private String uuidPasskey;
|
||||||
private String dateCreate;
|
private String dateCreate;
|
||||||
private String dateModify;
|
private String dateModify;
|
||||||
|
|
||||||
|
private Long codError;
|
||||||
|
private String mensajeError;
|
||||||
|
private String constraintName;
|
||||||
}
|
}
|
||||||
@ -8,6 +8,7 @@ import com.banesco.common.domain.model.*;
|
|||||||
import com.banesco.common.infrastructure.config.RestClientConfig;
|
import com.banesco.common.infrastructure.config.RestClientConfig;
|
||||||
import com.banesco.module.payment_status.application.usecase.PaymentStatusUseCase;
|
import com.banesco.module.payment_status.application.usecase.PaymentStatusUseCase;
|
||||||
import com.banesco.module.payment_status.domain.dto.request.PaymentStatusRequest;
|
import com.banesco.module.payment_status.domain.dto.request.PaymentStatusRequest;
|
||||||
|
import com.banesco.module.payment_status.domain.model.PaymentStatus;
|
||||||
import jakarta.enterprise.context.ApplicationScoped;
|
import jakarta.enterprise.context.ApplicationScoped;
|
||||||
import jakarta.inject.Inject;
|
import jakarta.inject.Inject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -60,18 +61,22 @@ public class PaymentStatusClient implements PaymentStatusUseCase {
|
|||||||
log.info("Respuesta recibida: {}, estatus: {} -> {}", isSuccess, response.getEstatus(), response.getMensaje());
|
log.info("Respuesta recibida: {}, estatus: {} -> {}", isSuccess, response.getEstatus(), response.getMensaje());
|
||||||
|
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
Object error = response.getDetalle();
|
PaymentStatus error = (PaymentStatus) response.getDetalle();
|
||||||
|
|
||||||
log.error(
|
log.error(
|
||||||
"API retornó error de negocio. Código: {}, Mensaje: {}, Detalle Error: {}",
|
"API retornó error de negocio. Código: {}, Mensaje: {}, Error Interno: {} -> {}",
|
||||||
response.getEstatus(),
|
response.getEstatus(),
|
||||||
response.getMensaje(),
|
response.getMensaje(),
|
||||||
error
|
error.getCodError(),
|
||||||
|
error.getMensajeError()
|
||||||
);
|
);
|
||||||
|
|
||||||
throw ApiPrivateException.builder()
|
throw ApiPrivateException.builder()
|
||||||
.statusCode(response.getEstatus())
|
.statusCode(response.getEstatus())
|
||||||
.message((!Objects.isNull(error)) ? error.toString() : "EMPTY_MESSAGE")
|
.message((!Objects.isNull(error.getCodError()))
|
||||||
|
? error.getCodError() + ":" + error.getMensajeError()
|
||||||
|
: "EMPTY_MESSAGE"
|
||||||
|
)
|
||||||
.build();
|
.build();
|
||||||
} else if(Objects.isNull(response.getDetalle())) {
|
} else if(Objects.isNull(response.getDetalle())) {
|
||||||
log.error(
|
log.error(
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class ServiceIssuePaymentStatusService implements ServiceIssuePaymentStat
|
|||||||
return apiPrivate(request);
|
return apiPrivate(request);
|
||||||
} catch (ApiPrivateException e) {
|
} catch (ApiPrivateException e) {
|
||||||
log.warn(
|
log.warn(
|
||||||
"Excepción de la persistencia del sp: {} -> {}",
|
"Excepción de la api privada: {} -> {}",
|
||||||
e.getStatusCode(),
|
e.getStatusCode(),
|
||||||
e.getMessage()
|
e.getMessage()
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user