Μετάβαση στο περιεχόμενο

Totalware — Error codes

Όταν το Estia.API επιστρέφει 422 Provider business error με provider: "Totalware", το providerErrorMessage περιέχει το upstream error message. Παρακάτω τα codes που μπορούν να εμφανιστούν.

Το Estia.API εμπλουτίζει τα Totalware errors μέσω του TotalwareErrorCodeMapper, ο οποίος μεταφράζει γνωστούς numeric codes σε human-readable descriptions. Άγνωστοι codes περνούν unchanged με το format [{code}] {message}.

Error envelope shape

[<code>] <description>: <upstream message>
Στοιχείο Περιγραφή
<code> Numeric error code από τον Totalware (3-ψήφιος)
<description> Mapping από TotalwareErrorCodeMapper.KnownCodes — fallback: μόνο code + message
<upstream message> Raw message από τον provider

Codes

Τα enumerated codes είναι ομαδοποιημένα ανά εκατοντάδες: 1xx = authentication/authorization, 2xx = request validation, 3xx = resource lookup, 4xx = business rules, 5xx = provider internal.

Code Meaning Consumer action
100 Authentication failed Ελέγξτε credentials/token — δεν είναι retry-able
101 Authorization denied Επικοινωνία με τον πάροχο για permissions
200 Invalid request data Fix το request payload (schema/types)
201 Missing required field Συμπληρώστε όλα τα required πεδία
202 Field validation failed Διορθώστε τιμές που απορρίφθηκαν
300 Resource not found Επιβεβαιώστε το ID — δεν είναι retry-able
301 Contract not found Λάθος contract reference
302 Proposal not found Λάθος proposal reference
400 Business rule violation Διαβάστε providerErrorMessage· business decision
401 Premium calculation error Επανέλεγχος δεδομένων τιμολόγησης
402 Cover combination not allowed Επιλέξτε συμβατό συνδυασμό covers
500 Internal provider error Retry με backoff· escalate αν επιμένει
501 Service temporarily unavailable Exponential backoff retry
(unknown) Άγνωστος code — [code] message passthrough Logging για observability

Παράδειγμα 422 response

{
  "type": "https://docs.insurancegateway.gr/errors/provider-business",
  "title": "Provider business error",
  "status": 422,
  "detail": "Totalware declined: cover combination not allowed.",
  "instance": "/totalware/quotations/calculate",
  "provider": "Totalware",
  "providerErrorMessage": "[402] Cover combination not allowed: Cannot combine FullComp with BasicTPL.",
  "category": "business",
  "correlationId": "9f3a2b1c-4d5e-6789-abcd-ef0123456789"
}

Σχετικά