Version: 1.0.0
Error Type: 404-not-found
HTTP Status: 404
Resource not found error examples across both the Web Application API and the Consensus Network API. Note that these two APIs handle missing resources differently.
Endpoint: webapp-player-by-id
Request:
{
"method": "GET",
"url": "http://localhost:8080/api/player/1-999",
"headers": {
"Accept": "application/json"
}
}
Response (404):
{
"error": "Player not found",
"code": 404,
"details": [
"Player ID 1-999 does not exist"
]
}
player_id is correct, or query the player list to find valid IDsEndpoint: webapp-planet-by-id
Request:
{
"method": "GET",
"url": "http://localhost:8080/api/planet/2-999",
"headers": {
"Accept": "application/json"
}
}
Response (404):
{
"error": "Planet not found",
"code": 404,
"details": [
"Planet ID 2-999 does not exist"
]
}
planet_id and try againplanet_id is correct, or query the planet list to find valid IDsThe Consensus Network API returns HTTP 200 even for missing resources. The error is indicated in the response body’s code field.
Endpoint: player-by-id
Request:
{
"method": "GET",
"url": "http://localhost:1317/structs/player/1-999",
"headers": {
"Accept": "application/json"
}
}
Response (200 – with error in body):
{
"code": 2,
"message": "codespace structs code 1900: object not found",
"details": []
}
response.code field.