Skip to content

Commit

Permalink
update error codes as defined in DR and updated openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
gioelemella committed Oct 11, 2024
1 parent 20c0e36 commit a197359
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.3",
"info": {
"title": "PagoPa Payment Options",
"description": "PagoPa Payment Options service \n ### APP ERROR CODES ### \n\n\n <details><summary>Details</summary>\n **NAME** | **HTTP STATUS CODE** | **DESCRIPTION** \n- | - | - \n **ODP-001** | *Bad Request* | ODP-SINTASSI. Errore riportato in caso di errore di sintassi nel contenuto della richiesta verso ODP\n **ODP-002** | *Not Found* | ODP_PSP_SCONOSCIUTO. Errore riportato in caso non sia presente fra i dati ottenuti da config-cache un psp coincidente con l’id fornito in input\n **ODP-003** | *Bad Request* | ODP_PSP_DISABILITATO. Errore riportato in caso il psp coincidente con l’id fornito in input risulti disabilitato\n **ODP-004** | *Not Found* | ODP_INTERMEDIARIO_PSP_SCONOSCIUTO. Errore riportato in caso il broker psp coincidente con i dati forniti in input non sia presente nei dati ottenuti da config-cache\n **ODP-005** | *Bad Request* | ODP_INTERMEDIARIO_PSP_DISABILITATO. Errore riportato in caso il broker psp coincidente con l’id fornito in input risulti disabilitato\n **ODP-006** | *Unauthorized* | ODP_AUTENTICAZIONE. Errore di autenticazione rispetto ai dati forniti\n **ODP-007** | *Forbidden* | ODP_AUTORIZZAZIONE. Errore di autorizzazione rispetto ai dati forniti\n **ODP-008** | *Bad Request* | ODP_SEMANTICA. Errore fornito in caso della presenza di casi d’invalidità semantica nei dati del flusso di verifica\n **ODP-009** | *Not Found* | ODP_STAZIONE_INT_PA_SCONOSCIUTA. Errore forninca in caso di assenza associazione stazione e PA\n **ODP-0099** | *Bad Request* | ODP_STAZIONE_INT_PA_DISABILITATA. Errore riportato in caso la stazione coincidente con l’id fornito in input risulti disabilitato\n **ODP-010** | *Service Unavailable* | ODP_STAZIONE_INT_PA_IRRAGGIUNGIBILE. Errore fornito in caso d’irraggiungibilità della stazione\n **ODP-011** | *Bad Request* | ODP_STAZIONE_INT_PA_SERVIZIO_NON_ATTIVO. Errore fornito in caso di servizio non attivo\n **ODP-012** | *Internal Server Error* | ODP_STAZIONE_INT_PA_TIMEOUT. Errore fornito in caso di timeout della stazione\n **ODP-013** | *Internal Server Error* | ODP_ERRORE_EMESSO_DA_PAA. Errore fornito in caso di errori da PAA\n **ODP-014** | *Bad Request* | ODP_STAZIONE_INT_PA_ERRORE_RESPONSE. Errore fornito in caso di risposta KO dalla stazione\n **ODP-015** | *Bad Request* | ODP_PSP_NAV_NOT_NMU. Errore fornito nel caso in cui il nav non sia valido per il flusso OdP\n **ODP-016** | *Bad Request* | ODP_SYSTEM_ERROR Codice d’errore generico\n **ODP-017** | *Internal Server Error* | ODP_SYSTEM_ERROR. Codice d’errore generico\n **ODP-018** | *Bad Request* | ODP_INTERMEDIARIO_PA_DISABILITATO\n **ODP-019** | *Not Found* | ODP_INTERMEDIARIO_PA_SCONOSCIUTO\n **ODP-020** | *Bad Request* | ODP_DOMINIO_DISABILITATO\n **ODP-021** | *Not Found* | ODP_DOMINIO_SCONOSCIUTO \n\n </details> \n",
"description": "PagoPa Payment Options service \n ### APP ERROR CODES ### \n\n\n <details><summary>Details</summary>\n **NAME** | **HTTP STATUS CODE** | **DESCRIPTION** \n- | - | - \n **ODP-001** | *Bad Request* | ODP-SINTASSI. Errore riportato in caso di errore di sintassi nel contenuto della richiesta verso ODP\n **ODP-002** | *Not Found* | ODP_PSP_SCONOSCIUTO. Errore riportato in caso non sia presente fra i dati ottenuti da config-cache un psp coincidente con l’id fornito in input\n **ODP-003** | *Bad Request* | ODP_PSP_DISABILITATO. Errore riportato in caso il psp coincidente con l’id fornito in input risulti disabilitato\n **ODP-004** | *Not Found* | ODP_INTERMEDIARIO_PSP_SCONOSCIUTO. Errore riportato in caso il broker psp coincidente con i dati forniti in input non sia presente nei dati ottenuti da config-cache\n **ODP-005** | *Bad Request* | ODP_INTERMEDIARIO_PSP_DISABILITATO. Errore riportato in caso il broker psp coincidente con l’id fornito in input risulti disabilitato\n **ODP-006** | *Unauthorized* | ODP_AUTENTICAZIONE. Errore di autenticazione rispetto ai dati forniti\n **ODP-007** | *Forbidden* | ODP_AUTORIZZAZIONE. Errore di autorizzazione rispetto ai dati forniti\n **ODP-008** | *Bad Request* | ODP_SEMANTICA. Errore fornito in caso della presenza di casi d’invalidità semantica nei dati del flusso di verifica\n **ODP-009** | *Not Found* | ODP_STAZIONE_INT_PA_SCONOSCIUTA. Errore forninca in caso di assenza associazione stazione e PA\n **ODP-010** | *Bad Request* | ODP_STAZIONE_INT_PA_DISABILITATA. Errore riportato in caso la stazione coincidente con l’id fornito in input risulti disabilitato\n **ODP-011** | *Service Unavailable* | ODP_STAZIONE_INT_PA_IRRAGGIUNGIBILE. Errore fornito in caso d’irraggiungibilità della stazione\n **ODP-012** | *Bad Request* | ODP_STAZIONE_INT_PA_SERVIZIO_NON_ATTIVO. Errore fornito in caso di servizio non attivo\n **ODP-013** | *Internal Server Error* | ODP_STAZIONE_INT_PA_TIMEOUT. Errore fornito in caso di timeout della stazione\n **ODP-014** | *Internal Server Error* | ODP_ERRORE_EMESSO_DA_PAA. Errore fornito in caso di errori da PAA\n **ODP-015** | *Bad Request* | ODP_STAZIONE_INT_PA_ERRORE_RESPONSE. Errore fornito in caso di risposta KO dalla stazione\n **ODP-016** | *Bad Request* | ODP_PSP_NAV_NOT_NMU. Errore fornito nel caso in cui il nav non sia valido per il flusso OdP\n **ODP-017** | *Bad Request* | ODP_SYSTEM_ERROR Codice d’errore generico\n **ODP-018** | *Internal Server Error* | ODP_SYSTEM_ERROR. Codice d’errore generico\n **ODP-019** | *Bad Request* | ODP_INTERMEDIARIO_PA_DISABILITATO\n **ODP-020** | *Not Found* | ODP_INTERMEDIARIO_PA_SCONOSCIUTO\n **ODP-021** | *Bad Request* | ODP_DOMINIO_DISABILITATO\n **ODP-022** | *Not Found* | ODP_DOMINIO_SCONOSCIUTO \n\n </details> \n",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.4.6-1-fix-openapi"
},
Expand All @@ -12,7 +12,7 @@
"description": "Localhost base URL"
},
{
"url": "https://{host}/payment-options/service/v1",
"url": "https://{host}/odp/service/v1",
"description": "Base URL",
"variables": {
"host": {
Expand Down Expand Up @@ -344,4 +344,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/it/gov/pagopa/payment/options/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
description = "placeholder-for-replace"),
servers = {
@Server(url = "http://localhost:8080", description = "Localhost base URL"),
@Server(url = "https://{host}/payment-options/service/v1", description = "Base URL",
@Server(url = "https://{host}/odp/service/v1", description = "Base URL",
variables = {
@ServerVariable(name = "host",
enumeration = {"api.dev.platform.pagopa.it", "api.uat.platform.pagopa.it", "api.platform.pagopa.it"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,46 +44,46 @@ public enum AppErrorCodeEnum {
"ODP_STAZIONE_INT_PA_SCONOSCIUTA. "
+ "Errore forninca in caso di assenza associazione stazione e PA"),

ODP_STAZIONE_INT_PA_DISABILITATA(Status.BAD_REQUEST, "ODP-0099",
ODP_STAZIONE_INT_PA_DISABILITATA(Status.BAD_REQUEST, "ODP-010",
"ODP_STAZIONE_INT_PA_DISABILITATA. Errore riportato in caso "
+ "la stazione coincidente con l’id fornito in input risulti disabilitato"),
ODP_STAZIONE_INT_PA_IRRAGGIUNGIBILE(Status.SERVICE_UNAVAILABLE, "ODP-010",
ODP_STAZIONE_INT_PA_IRRAGGIUNGIBILE(Status.SERVICE_UNAVAILABLE, "ODP-011",
"ODP_STAZIONE_INT_PA_IRRAGGIUNGIBILE. "
+ "Errore fornito in caso d’irraggiungibilità della stazione"),

ODP_STAZIONE_INT_PA_SERVIZIO_NON_ATTIVO(Status.BAD_REQUEST, "ODP-011",
ODP_STAZIONE_INT_PA_SERVIZIO_NON_ATTIVO(Status.BAD_REQUEST, "ODP-012",
"ODP_STAZIONE_INT_PA_SERVIZIO_NON_ATTIVO. "
+ "Errore fornito in caso di servizio non attivo"),

ODP_STAZIONE_INT_PA_TIMEOUT(Status.INTERNAL_SERVER_ERROR, "ODP-012",
ODP_STAZIONE_INT_PA_TIMEOUT(Status.INTERNAL_SERVER_ERROR, "ODP-013",
"ODP_STAZIONE_INT_PA_TIMEOUT. Errore fornito in caso di timeout della stazione"),

ODP_ERRORE_EMESSO_DA_PAA(Status.INTERNAL_SERVER_ERROR, "ODP-013",
ODP_ERRORE_EMESSO_DA_PAA(Status.INTERNAL_SERVER_ERROR, "ODP-014",
"ODP_ERRORE_EMESSO_DA_PAA. Errore fornito in caso di errori da PAA"),

ODP_STAZIONE_INT_PA_ERRORE_RESPONSE(Status.BAD_REQUEST, "ODP-014",
ODP_STAZIONE_INT_PA_ERRORE_RESPONSE(Status.BAD_REQUEST, "ODP-015",
"ODP_STAZIONE_INT_PA_ERRORE_RESPONSE. "
+ "Errore fornito in caso di risposta KO dalla stazione"),

ODP_PSP_NAV_NOT_NMU(Status.BAD_REQUEST, "ODP-015",
ODP_PSP_NAV_NOT_NMU(Status.BAD_REQUEST, "ODP-016",
"ODP_PSP_NAV_NOT_NMU. Errore fornito nel caso in cui "
+ "il nav non sia valido per il flusso OdP"),

ODP_STAZIONE_INT_VERIFICA_ODP_DISABILITATA(Status.BAD_REQUEST, "ODP-016",
ODP_STAZIONE_INT_VERIFICA_ODP_DISABILITATA(Status.BAD_REQUEST, "ODP-017",
"ODP_SYSTEM_ERROR Codice d’errore generico"),
ODP_SYSTEM_ERROR(Status.INTERNAL_SERVER_ERROR, "ODP-017",
ODP_SYSTEM_ERROR(Status.INTERNAL_SERVER_ERROR, "ODP-018",
"ODP_SYSTEM_ERROR. Codice d’errore generico"),

ODP_INTERMEDIARIO_PA_DISABILITATO(Status.BAD_REQUEST, "ODP-018",
ODP_INTERMEDIARIO_PA_DISABILITATO(Status.BAD_REQUEST, "ODP-019",
"ODP_INTERMEDIARIO_PA_DISABILITATO"),

ODP_INTERMEDIARIO_PA_SCONOSCIUTO(Status.NOT_FOUND, "ODP-019",
ODP_INTERMEDIARIO_PA_SCONOSCIUTO(Status.NOT_FOUND, "ODP-020",
"ODP_INTERMEDIARIO_PA_SCONOSCIUTO"),

ODP_DOMINIO_DISABILITATO(Status.BAD_REQUEST, "ODP-020",
ODP_DOMINIO_DISABILITATO(Status.BAD_REQUEST, "ODP-021",
"ODP_DOMINIO_DISABILITATO"),

ODP_DOMINIO_SCONOSCIUTO(Status.NOT_FOUND, "ODP-021",
ODP_DOMINIO_SCONOSCIUTO(Status.NOT_FOUND, "ODP-022",
"ODP_DOMINIO_SCONOSCIUTO");

private final Response.Status status;
Expand Down

0 comments on commit a197359

Please sign in to comment.