6. Fehlerantwort-Body
Einige Nicht-Antwort-Responses KÖNNEN Entity-Bodies mit Informationen zurückgeben, die beschreibender sein könnten.
Die Grundstruktur dieser Response ist eine Objektklasse, die eine ERFORDERLICHE Fehlercodenummer (entsprechend dem HTTP-Response-Code) enthält, gefolgt von einem OPTIONALEN String namens "title" und einem OPTIONALEN Array von Strings namens "description".
Dies ist ein Beispiel für den allgemeinen Response-Body.
{
"errorCode": 418,
"title": "Your Beverage Choice is Not Available",
"description":
[
"I know coffee has more ummppphhh.",
"Sorry, dude!"
]
}
Abbildung 28
Dies ist ein Beispiel für den allgemeinen Response-Body mit rdapConformance- und notices-Datenstrukturen:
{
"rdapConformance" :
[
"rdap_level_0"
],
"notices" :
[
{
"title" : "Beverage Policy",
"description" :
[
"Beverages with caffeine for keeping horses awake."
],
"links" :
[
{
"value" : "https://example.net/ip/192.0.2.0/24",
"rel" : "alternate",
"type" : "text/html",
"href" : "https://www.example.com/redaction_policy.html"
}
]
}
],
"lang" : "en",
"errorCode": 418,
"title": "Your beverage choice is not available",
"description":
[
"I know coffee has more ummppphhh.",
"Sorry, dude!"
]
}
Abbildung 29