# Troubleshoot Hosting (https://developer.godaddy.com/en/docs/api-users/troubleshoot/hosting)

---
title: Troubleshoot Hosting
description: >-
  Diagnose and resolve common errors when deploying and operating apps on
  GoDaddy's hosting platform.
agentNotes:
  scopes:
    - 'hosting.application:read'
    - 'hosting.log:read'
  idempotent: true
  destructive: false
  failureRecovery: All diagnostic calls on this page are read-only and safe to retry.
faqItems:
  - question: Why is my hosting app creation job stuck in pending?
    answer: >-
      Most create-app jobs complete within a minute. If the job stays in pending
      for more than 2 minutes, treat it as stuck — retry the POST /apps call
      with a new name.
  - question: Why did my zip upload fail?
    answer: >-
      The most common cause is a missing package.json at the zip root, a missing
      build or start script, or node_modules included in the zip. Verify the zip
      structure against the Node.js app requirements.
  - question: Why am I getting 401 Unauthorized from the Hosting API?
    answer: >-
      The token is expired, revoked, or missing a required scope. Verify the
      required scope is included in your PAT. Create a new PAT with the correct
      scopes.
  - question: Why is the publish variant not showing running after deployment?
    answer: >-
      Allow up to 30 seconds for the variant status to flip to running after
      POST /apps/{appId}/deployments. If it stays in a non-running state, fetch
      application logs to check for startup errors.
keywords: >-
  job stuck pending, upload failed zip, 401 unauthorized hosting, 429 rate
  limit, deployment failed, hosting.secret:read scope, app not running,
  troubleshoot hosting
related:
  tutorials:
    - title: Deploy your Node.js app
      href: /docs/api-users/hosting/workflows/deploy-nodejs-app
  guides:
    - title: Read logs
      href: /docs/api-users/hosting/read-logs
  concepts:
    - title: Hosting concepts
      href: /docs/api-users/hosting/concepts
    - title: Node.js app requirements
      href: /docs/api-users/hosting/app-requirements
  apis:
    - title: Hosting API reference
      href: /docs/references/rest/hosting
pageId: 70c68868-ab76-41dd-8b0e-aa84e8b0200f
---

## Overview

This page covers common failures when using the Hosting API, with causes and steps to resolve them. Go to [Read logs](https://developer.godaddy.com/docs/api-users/hosting/read-logs) for build and application output when diagnosing runtime failures.

## App creation job stuck in pending

**Symptom:** `GET /app-operations/{operationId}` returns `status: "PENDING"` for more than two minutes.

**Cause:** Upstream provisioning delay or a transient platform error.

**Resolution:**

* Wait two minutes. Most create jobs complete within 30–60 seconds.
* If still pending after 2 minutes, treat the job as failed.
* Retry `POST /apps` with a new app name. Don't reuse the stuck operation id.

## Source import job failed

**Symptom:** `GET /apps/{appId}/imports/{importId}` returns `status: "FAILED"`.

**Cause:** A malformed zip or build failure causes most import failures.

**Resolution:**

* Confirm the zip root contains a `package.json`. The build system must find it at the top level.
* Confirm the zip doesn't contain a nested project root (e.g., a folder wrapping all the files).
* Verify the app meets all deployment requirements. Go to [Node.js app requirements](https://developer.godaddy.com/docs/api-users/hosting/app-requirements) for the full list.
* After fixing the zip, upload again with `POST /apps/{appId}/imports`.

## 401 Unauthorized

**Symptom:** Any request returns `401 Unauthorized`.

**Cause:** The token is expired, revoked, or missing a required scope.

**Resolution:**

1. Check the token expiry date in the [Personal Access Tokens](https://developer.godaddy.com/personal-access-token) portal.
2. Verify the token includes the scope the operation requires. Go to [Hosting core concepts](https://developer.godaddy.com/docs/api-users/hosting/concepts#scopes-reference) for the full scopes table.
3. Note: `GET /apps/{appId}/secrets` requires `hosting.secret:read`.
4. Create a new token with the correct scopes if the original has expired or lacked a scope.

## 429 Too Many Requests

**Symptom:** Requests return `429 Too Many Requests`.

**Cause:** Rate limit exceeded. Limits are enforced per client IP and vary by operation (10–120 req/min).

**Resolution:**

* Implement exponential backoff. Start with a 1-second delay and double on each retry, up to a maximum of 30 seconds.
* Avoid tight polling loops — use 2–5 second intervals when polling job status.
* Go to [Rate limits](https://developer.godaddy.com/docs/api-users/rate-limits) for general guidance.

## App not running after publish

**Symptom:** `GET /apps/{appId}/status` shows the `publish` variant in a non-running state after `POST /apps/{appId}/deployments`.

**Cause:** The app might have a startup error, or the deployment is still rolling out.

**Resolution:**

1. Allow up to 30 seconds for the status to flip to `running` after a publish. Poll with a five second interval.

2. If the status remains non-running, fetch application logs to check for startup errors.

3. Fix the error, upload a corrected zip, and publish again. Go to [Deploy your Node.js app](https://developer.godaddy.com/docs/api-users/hosting/workflows/deploy-nodejs-app) for the full deploy flow.

4. Fetch application logs:

   ```bash tab="curl"
   curl -s "$BASE_URL/v1/hosting/apps/$APP_ID/logs?variant=PUBLISH" \
     -H "Authorization: Bearer $GODADDY_PAT" | jq .
   ```

   ```js tab="Node"
   const res = await fetch(
     `${process.env.BASE_URL}/v1/hosting/apps/${appId}/logs?variant=PUBLISH`,
     { headers: { Authorization: `Bearer ${process.env.GODADDY_PAT}` } },
   );
   const logs = await res.json();
   ```

   ```python tab="Python"
   import requests, os

   resp = requests.get(
       f"{os.environ['BASE_URL']}/v1/hosting/apps/{app_id}/logs",
       headers={"Authorization": f"Bearer {os.environ['GODADDY_PAT']}"},
       params={"variant": "PUBLISH"},
   )
   logs = resp.json()
   ```

   ```go tab="Go"
   req, _ := http.NewRequest("GET",
       os.Getenv("BASE_URL")+"/v1/hosting/apps/"+appID+"/logs?variant=PUBLISH",
       nil)
   req.Header.Set("Authorization", "Bearer "+os.Getenv("GODADDY_PAT"))
   resp, _ := http.DefaultClient.Do(req)
   defer resp.Body.Close()
   ```

## WordPress site errors

WordPress sites (`appType=MHWP`) return the error envelope `{name, correlationId, message, details}`. The machine-readable code is `details[].issue`. Branch on it, not on `name` or `message`. Quote `correlationId` (also sent as the `X-Request-Id` header) when you contact support.

The following table lists the errors a WordPress site request can return and how to resolve each:

| Status | `details[].issue`                      | Returned by                                     | Cause                                                                                                                                             | Resolution                                                                                                                |
| ------ | -------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `400`  | `VALIDATION_FAILED`                    | Any                                             | The body, a query parameter, or the `Idempotency-Key` header is malformed.                                                                        | Read `details[].field` and `details[].location`, fix the value, and retry.                                                |
| `401`  | (empty body)                           | Any                                             | The PAT is expired or revoked, or it doesn't have the scope the operation needs. A PAT without the scope can get an empty `401` instead of `403`. | Check the scope for the operation. A missing scope can return `401` or `403`, so handle both. Create a new PAT if needed. |
| `401`  | `OAUTH_REQUIRED`, `INVALID_TOKEN`      | Any                                             | No bearer token, or the token is invalid.                                                                                                         | Send `Authorization: Bearer $GODADDY_PAT` with a current PAT.                                                             |
| `403`  | `INSUFFICIENT_SCOPE`, `ACCESS_DENIED`  | Any                                             | The token doesn't have the scope the operation needs, or the account can't use the API. For a missing scope the body can be empty.                | Add the scope: create a new PAT with it, or sign in to `gddy` again and approve it. Or use an account with API access.    |
| `403`  | `WORDPRESS_NOT_ENABLED`                | `POST /v1/hosting/apps`                         | WordPress sites aren't enabled for this account.                                                                                                  | Contact GoDaddy support. Don't retry.                                                                                     |
| `403`  | `SUBSCRIPTION_INACTIVE`                | `POST /v1/hosting/apps`, publish                | The Airo App Builder subscription isn't active.                                                                                                   | Reactivate the subscription, then retry. Unpublish still works.                                                           |
| `404`  | `APP_NOT_FOUND`, `OPERATION_NOT_FOUND` | Any                                             | The id doesn't exist or doesn't belong to your account. A deleted site returns this after the deletion finishes.                                  | Check the id. List sites with `GET /v1/hosting/apps?appType=MHWP`.                                                        |
| `409`  | `CREATE_IN_PROGRESS`                   | `POST /v1/hosting/apps`                         | Another create on the account is still running.                                                                                                   | Wait a few seconds and retry.                                                                                             |
| `409`  | `IDEMPOTENCY_IN_PROGRESS`              | `POST /v1/hosting/apps`                         | A request with the same `Idempotency-Key` is still running.                                                                                       | Wait, then retry with the same key to get its operation.                                                                  |
| `409`  | `MULTIPLE_SYSTEMS_AMBIGUOUS`           | `POST /v1/hosting/apps`                         | The account has more than one system, so the target is ambiguous.                                                                                 | Contact GoDaddy support.                                                                                                  |
| `409`  | `PUBLISH_STATE_CHANGE_IN_PROGRESS`     | `PUT .../publish-state`                         | A change in the other direction is still running, or another publish-state request on the same subscription is being accepted.                    | If a change is running, poll its operation, then retry. Otherwise retry after a few seconds.                              |
| `422`  | `SUBSCRIPTION_REQUIRED`                | `POST /v1/hosting/apps`                         | The account has no Airo App Builder subscription.                                                                                                 | Buy an Airo App Builder plan, then retry.                                                                                 |
| `422`  | `APP_LIMIT_EXCEEDED`                   | `POST /v1/hosting/apps`                         | The subscription has no free app slot.                                                                                                            | Delete a site you no longer need, then retry.                                                                             |
| `422`  | `SYSTEM_INCONSISTENT`                  | `POST /v1/hosting/apps`                         | The account isn't ready to add a site.                                                                                                            | Contact GoDaddy support.                                                                                                  |
| `422`  | `IDEMPOTENCY_KEY_MISMATCH`             | `POST /v1/hosting/apps`                         | You reused an `Idempotency-Key` with a different body.                                                                                            | Send a new UUID for a different request.                                                                                  |
| `422`  | `PUBLISH_LIMIT_EXCEEDED`               | Publish                                         | The plan allows no more published sites. The free plan allows none.                                                                               | Unpublish another site or upgrade the plan.                                                                               |
| `422`  | `ROOT_PATH_NOT_APPLICABLE`             | `PATCH /v1/hosting/apps/{appId}`                | WordPress sites have a fixed document root.                                                                                                       | Change `/name` only.                                                                                                      |
| `422`  | `APP_DELETING`                         | `PATCH`, `PUT .../publish-state`                | The site is being deleted.                                                                                                                        | Stop sending writes for this site.                                                                                        |
| `429`  | (empty body)                           | Any                                             | The rate limit is reached.                                                                                                                        | Wait the number of seconds in `Retry-After` if it's present, otherwise in `RateLimit-Reset`, then retry.                  |
| `500`  | `INTERNAL_ERROR`                       | Any                                             | An unexpected server error.                                                                                                                       | Retry with backoff. Contact support with the `correlationId` if it persists.                                              |
| `501`  | `NOT_APPLICABLE`                       | Deployments, secrets, logs, domains, and others | The operation doesn't apply to WordPress sites, or publish state was called for a Node.js app.                                                    | Use the WordPress operations. The list follows this table.                                                                |
| `503`  | `UPSTREAM_UNAVAILABLE`                 | Any                                             | A dependent service is unavailable, or another write holds the site's lock (`Retry-After: 5`).                                                    | Retry after the `Retry-After` value, or with backoff when it's absent.                                                    |

### Operations that return 501

Operations that don't apply to a product return `501 Not Implemented` with `details[].issue` `NOT_APPLICABLE`. For WordPress sites, these are:

* deployments: `GET` and `POST /v1/hosting/apps/{appId}/deployments`, `GET /v1/hosting/apps/{appId}/deployments/{deploymentId}`, and its `/logs`
* restarts: `POST /v1/hosting/apps/{appId}/restarts`
* source imports: `POST /v1/hosting/apps/{appId}/imports` and `GET /v1/hosting/apps/{appId}/imports/{importId}`
* secrets: `GET` and `PATCH /v1/hosting/apps/{appId}/secrets`
* logs: `GET /v1/hosting/apps/{appId}/logs`
* domains: `GET` and `POST /v1/hosting/apps/{appId}/domains`, and `GET` and `DELETE /v1/hosting/apps/{appId}/domains/{domainId}`
* subscriptions: `GET` and `PUT /v1/hosting/apps/{appId}/subscription`, and `GET /v1/hosting/subscriptions?hostingProduct=MANAGED_WORDPRESS`

For a Node.js app, both publish-state operations return `501 NOT_APPLICABLE`.

### WordPress site rate limits

The Hosting API limits `POST /v1/hosting/apps?appType=MHWP` and `PUT /v1/hosting/apps/{appId}/publish-state` to 10 requests per minute and 100 per hour for each customer. Other WordPress site requests are limited to 600 per minute for each customer. A `429` can have an empty body and no `Retry-After` header, so wait the number of seconds in `RateLimit-Reset` before you retry. If a `429` carries `Retry-After`, wait that long instead.

### WordPress site creation failed

**Symptom:** `GET /v1/hosting/app-operations/{operationId}` returns `status: "FAILED"` for a `CREATE_APP` operation.

**Cause:** `error.details[].issue` is `CAPACITY_UNAVAILABLE` when no capacity was free, or `APP_CREATION_FAILED` for any other failure. The API didn't create a site.

**Resolution:**

* For `CAPACITY_UNAVAILABLE`, retry `POST /v1/hosting/apps?appType=MHWP` later with a new `Idempotency-Key`.
* For `APP_CREATION_FAILED`, retry once. Contact GoDaddy support with the `correlationId` if it fails again.

### Publish or unpublish failed

**Symptom:** `GET /v1/hosting/app-operations/{operationId}` returns `status: "FAILED"` for a `SET_PUBLISH_STATE` operation.

**Cause:** `error.details[].issue` is `PUBLISH_LIMIT_EXCEEDED` when the plan ran out of published-site slots during the change, or `PUBLISH_STATE_CHANGE_FAILED` for any other failure. The site keeps its previous state.

**Resolution:**

* For `PUBLISH_LIMIT_EXCEEDED`, unpublish another site or upgrade the plan, then retry the `PUT`.
* For `PUBLISH_STATE_CHANGE_FAILED`, retry the `PUT`. Contact GoDaddy support with the `correlationId` if it fails again.
