Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sollte ein API-Request fehlerhaft sein wird ein 4XX oder 5XX status zurück gegeben.

Als Response-Content wird ein Error-Objekt mit zusätzlichen Fehlerinformationen zurück gegebenIf an API request is incorrect, a 4XX or 5XX status is returned.

An error object with additional error information is returned as response content.

Response-Content

Code Block
languagejson
{
    "error": {
        "status_code": [HTTP-StatusCode-Number],
        "code": "[HTTP-StatusCode-Text]",
        "display_message": "[Error Message]",
        "internal_message": "[Error Message]",
        "inner_errors": [],
        "details": {
            "context": {
                "app_customer_id": [AppCustomerID the request was made for],
                "app_customer_name": "[AppCustomerName the request was made for]",
                "tenant_id": [TenantId of the user that made the request],
                "tenant_name": "[TenantName of the user that made the request]",
                "user_id": [Id of the user that made the request],
                "user_name": "[Name of the user that made the request]",
                "route_template": "[The route-template used by the API]",
                "route_values": {},
                "request_method": "[The current HTTP-Method]",
                "request_uri": "[The current request-URI]"
            }
        },
        "_type": "[Full typeName of the exception]",
        "stack_trace": "[The Current StackTrace]"
    }
}

...

Code Block
languagejson
{
    "error": {
        "status_code": 400,
        "code": "BadRequest",
        "display_message": "Field core_identity_type.id2 not found on type ICoreIdentity",
        "internal_message": "Field core_identity_type.id2 not found on type ICoreIdentity",
        "inner_errors": [],
        "details": {
            "context": {
                "app_customer_id": 900000,
                "app_customer_name": "Default App Customer",
                "tenant_id": 1,
                "tenant_name": "Root",
                "user_id": 10,
                "user_name": "",
                "route_template": "apiv2/servicedmcore/coreidentity/{id}",
                "route_values": {
                    "id": "20"
                },
                "request_method": "GET",
                "request_uri": "https://localhost:8000/apiv2/latest/servicedmcore/CoreIdentity/20?fields=id%2cactive%2cforeign_id%2cci_given_name%2cci_family_name%2cci_private_address_line_1%2ccore_identity_type.id2"
            }
        },
        "_type": "iTsense.Moving.Common.Exceptions.GeneralException",
        "stack_trace": "   at iTsense..."
    }
}