Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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 gegeben

Response-Content

{
    "error": {
        "StatusCode": [HTTP-StatusCode-Number],
        "Code": "[HTTP-StatusCode-Text]",
        "DisplayMessage": "[Error Message]",
        "InternalMessage": "[Error Message]",
        "InnerErrors": [],
        "Details": {
            "Context": {
                "AppCustomerId": [AppCustomerID the request was made for],
                "AppCustomerName": "[AppCustomerName the request was made for]",
                "TenantId": [TenantId of the user that made the request],
                "TenantName": "[TenantName of the user that made the request]",
                "UserId": [Id of the user that made the request],
                "UserName": "[Name of the user that made the request]",
                "RouteTemplate": "[The route-template used by the API]",
                "RouteValues": {},
                "RequestMethod": "[The current HTTP-Method]",
                "RequestUri": "[The current request-URI]"
            }
        },
        "_type": "[Full typeName of the exception]",
        "StackTrace": "[The Current StackTrace]"
    }
}

Example:

{
    "error": {
        "StatusCode": 400,
        "Code": "BadRequest",
        "DisplayMessage": "Sequence contains more than one element",
        "InternalMessage": "Sequence contains more than one element",
        "InnerErrors": [],
        "Details": {
            "Context": {
                "AppCustomerId": 900000,
                "AppCustomerName": "Default App Customer",
                "TenantId": 1,
                "TenantName": "Root",
                "UserId": 5,
                "UserName": "",
                "RouteTemplate": "apiv2/servicedmcore/coreidentity",
                "RouteValues": {},
                "RequestMethod": "PATCH",
                "RequestUri": "https://localhost:8000/apiv2/servicedmcore/CoreIdentity"
            }
        },
        "_type": "iTsense.Moving.Common.Exceptions.GeneralException",
        "StackTrace": "..."
    }
}
  • No labels