When you read the documentation of createSite
When there is an error, the response schema is
{ message: string, code: integer<int64> }
but it's not the case because we get this JSON message:
{
"errors": {
"subdomain": ["must be unique"]
}
}
Also, the status code is 422, it's not documented.