invalid_country_code

HTTP 400

Validation failed

Type URL

https://developer.hostup.se/errors/invalid_country_code

Detail message

Country code must be a 2-letter ISO country code.

Example response

{
  "type": "https://developer.hostup.se/errors/invalid_country_code",
  "title": "Validation failed",
  "status": 400,
  "detail": "Country code must be a 2-letter ISO country code.",
  "code": "invalid_country_code",
  "instance": "/api/v2/...",
  "requestId": "req_abc123",
  "timestamp": "2026-04-27T12:00:00.000Z"
}

Handling this error

const response = await fetch(url, options);

if (!response.ok) {
  const problem = await response.json();

  if (problem.code === "invalid_country_code") {
    // Handle: Validation failed
    console.error(problem.detail);
  }
}