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": {
        "StatusCodestatus_code": [HTTP-StatusCode-Number],
        "Codecode": "[HTTP-StatusCode-Text]",
        "DisplayMessagedisplay_message": "[Error Message]",
        "InternalMessageinternal_message": "[Error Message]",
        "InnerErrorsinner_errors": [],
        "Detailsdetails": {
            "Contextcontext": {
                "AppCustomerIdapp_customer_id": [AppCustomerID the request was made for],
                "AppCustomerNameapp_customer_name": "[AppCustomerName the request was made for]",
                "TenantIdtenant_id": [TenantId of the user that made the request],
                "TenantNametenant_name": "[TenantName of the user that made the request]",
                "UserIduser_id": [Id of the user that made the request],
                "UserNameuser_name": "[Name of the user that made the request]",
                "RouteTemplateroute_template": "[The route-template used by the API]",
                "RouteValuesroute_values": {},
                "RequestMethodrequest_method": "[The current HTTP-Method]",
                "RequestUrirequest_uri": "[The current request-URI]"
            }
        },
        "_type": "[Full typeName of the exception]",
        "StackTracestack_trace": "[The Current StackTrace]"
    }
}

...

Code Block
languagejson
{
    "error": {
        "StatusCodestatus_code": 400,
        "Codecode": "BadRequest",
        "DisplayMessagedisplay_message": "Sequence contains more than one elementField core_identity_type.id2 not found on type ICoreIdentity",
        "InternalMessageinternal_message": "Sequence contains more than one elementField core_identity_type.id2 not found on type ICoreIdentity",
        "InnerErrorsinner_errors": [],
        "Detailsdetails": {
            "Contextcontext": {
                "AppCustomerIdapp_customer_id": 900000,
                "AppCustomerNameapp_customer_name": "Default App Customer",
                "TenantIdtenant_id": 1,
                "TenantNametenant_name": "Root",
                "UserIduser_id": 510,
                "UserNameuser_name": "",
                "RouteTemplateroute_template": "apiv2/servicedmcore/coreidentity/{id}",
                "RouteValuesroute_values": {
                    "id": "20"
                },
                "RequestMethodrequest_method": "PATCHGET",
                "RequestUrirequest_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",
        "StackTracestack_trace": "   at iTsense..."
    }
}