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;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import lombok.*;
|
||||
|
||||
@ -35,4 +36,8 @@ public class PaymentStatus {
|
||||
private String uuidPasskey;
|
||||
private String dateCreate;
|
||||
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.module.payment_status.application.usecase.PaymentStatusUseCase;
|
||||
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.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -60,18 +61,22 @@ public class PaymentStatusClient implements PaymentStatusUseCase {
|
||||
log.info("Respuesta recibida: {}, estatus: {} -> {}", isSuccess, response.getEstatus(), response.getMensaje());
|
||||
|
||||
if (!isSuccess) {
|
||||
Object error = response.getDetalle();
|
||||
PaymentStatus error = (PaymentStatus) response.getDetalle();
|
||||
|
||||
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.getMensaje(),
|
||||
error
|
||||
error.getCodError(),
|
||||
error.getMensajeError()
|
||||
);
|
||||
|
||||
throw ApiPrivateException.builder()
|
||||
.statusCode(response.getEstatus())
|
||||
.message((!Objects.isNull(error)) ? error.toString() : "EMPTY_MESSAGE")
|
||||
.message((!Objects.isNull(error.getCodError()))
|
||||
? error.getCodError() + ":" + error.getMensajeError()
|
||||
: "EMPTY_MESSAGE"
|
||||
)
|
||||
.build();
|
||||
} else if(Objects.isNull(response.getDetalle())) {
|
||||
log.error(
|
||||
|
||||
@ -37,7 +37,7 @@ public class ServiceIssuePaymentStatusService implements ServiceIssuePaymentStat
|
||||
return apiPrivate(request);
|
||||
} catch (ApiPrivateException e) {
|
||||
log.warn(
|
||||
"Excepción de la persistencia del sp: {} -> {}",
|
||||
"Excepción de la api privada: {} -> {}",
|
||||
e.getStatusCode(),
|
||||
e.getMessage()
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user