Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggiornamento Metadati - Messaggi di errore #979

Open
ntrave opened this issue Sep 3, 2024 · 4 comments
Open

Aggiornamento Metadati - Messaggi di errore #979

ntrave opened this issue Sep 3, 2024 · 4 comments
Labels
enhancement New feature or request POST CRASH PROGRAM

Comments

@ntrave
Copy link

ntrave commented Sep 3, 2024

Buongiorno,
nel contesto del crash program, stiamo eseguendo delle invocazioni al servizio AggiornamentoMetadati.

Abbiamo riscontrato che, a seconda del tipo di errore ricevuto, la struttura dell'oggetto json cambia.

In particolare, nella prova di aggiornamento eseguita il 2024-09-03 14:33:49 (traceId: a6bbc70337bba08d, spanId: 2d8e4436bc0463ec), la struttura segue il seguente schema:
{ "traceID": "a6bbc70337bba08d", "spanID": "2d8e4436bc0463ec", "type": "/errors", "title": "Generic", "detail": "RDA generated an internal error.", "instance": "error/generic" }

Tuttavia, in altri casi (e in altre segnalazioni) troviamo invece lo schema seguente:
{ "traceID": "", "spanID": "", "type": "/msg/ini-error", "title": "Ini error.", "status": 500, "detail": "{\"traceID\":\"\",\"spanID\":\"\",\"type\":\"/errors\",\"title\":\"Generic\",\"detail\":\"RDA generated an internal error.\",\"instance\":\"error/generic\"}", "instance": "/msg/service-error/ini" }
dove il json string all'interno del detail rappresenta esattamente la prima risposta di errore riportata.

Rappresenta un nostro problema di parsing della risposta in ingresso oppure è un comportamento atteso?

Grazie in anticipo per l'attenzione.

@LucaRogledi
Copy link

Buon pomeriggio, confermiamo che è un problema di parsing e l'errore ricevuto è lo stesso. Restiamo a disposizione per ulteriori chiarimenti. Grazie

@LucaRogledi LucaRogledi added VERIFY The fixed issue needs to be verified and closed by the user and removed ON-HOLD labels Sep 3, 2024
@ntrave
Copy link
Author

ntrave commented Sep 4, 2024

cURL-AggiornamentoMetadati

Grazie del riscontro, stiamo verificando.

Se si prova a chiamare con cURL da CL o da Postman, però, si ottiene la stessa risposta:
{"traceID":"9759ef52dc923b4f","spanID":"f2c00fcecd112ee5","type":"/errors","title":"Generic","detail":"RDA generated an internal error.","instance":"error/generic"}

Chiamata da cURL: traceID 9f0e1cd1cdda5e34, spanID 8f0995e07588170b, ore 09:06 del 04/09/24 (allegato screenshot);
Chiamata da Postman: traceID f9a147196d18857d, spanID 1304332556792c00, ore 09:07 del 04/09/24.

@LucaRogledi LucaRogledi added ON-HOLD and removed VERIFY The fixed issue needs to be verified and closed by the user labels Sep 4, 2024
@LucaRogledi
Copy link

Buongiorno @ntrave, dopo ulteriori verifiche le confermiamo che è normale che l'oggetto delle 2 response da lei riportate sia diverso.
In particolare, il messaggio di errore ottenuto:

{ "traceID": "a6bbc70337bba08d", "spanID": "2d8e4436bc0463ec", "type": "/errors", "title": "Generic", "detail": "RDA generated an internal error.", "instance": "error/generic" }

è composto da un solo hop di chiamate e quindi come si può notare nel detail viene restituito proprio lo stesso errore da lei riscontrato nelle altre segnalazioni/negli altri casi.

Per queste ultime segnalazioni/casi che risultano differenti invece, è possibile che gli hop della chiamata siano più di uno e quindi all'interno della risposta viene riportato il messaggio di errore che ha restituito proprio il microservizio coinvolto nella transazione che ha preso l'errore, per esempio quello da lei indicato:

{ "traceID": "", "spanID": "", "type": "/msg/ini-error", "title": "Ini error.", "status": 500, "detail": "{\"traceID\":\"\",\"spanID\":\"\",\"type\":\"/errors\",\"title\":\"Generic\",\"detail\":\"RDA generated an internal error.\",\"instance\":\"error/generic\"}", "instance": "/msg/service-error/ini" } 

Grazie.

@LucaRogledi LucaRogledi added VERIFY The fixed issue needs to be verified and closed by the user and removed ON-HOLD labels Sep 6, 2024
@izamberlan
Copy link

izamberlan commented Sep 6, 2024

scusate se mi permetto (ntrave e io siamo della stessa azienda), ma noi vorremmo riuscire a capire da dove viene (di che tipo è) un determinato errore. Visto che in ambedue i casi l'errore viene dall'interfaccia con INI/RDA, non dovrebbe, anche nel primo caso, avere type valorizzato con "/msg/ini-error"? La cosa ci semplificherebbe troubleshooting e un minimo di automazione del trattamento degli errori - anche perché gli errori provenienti da INI possono, per esperienza, essere poco riconoscibili in quanto tali (cfr messaggi d'errore non aderenti a quelli previsti dalla specifica AgID)

PS: peraltro nel primo caso non viene ritornato uno status, cosa che rende ancora più complicato un trattamento errori

@LucaRogledi LucaRogledi added ON-HOLD and removed VERIFY The fixed issue needs to be verified and closed by the user labels Sep 6, 2024
@vigliottim vigliottim added enhancement New feature or request and removed ON-HOLD labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request POST CRASH PROGRAM
Projects
None yet
Development

No branches or pull requests

4 participants