> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threadi.au/llms.txt
> Use this file to discover all available pages before exploring further.

# System Statuses

export const StopWatchApiStatus = () => {
  const [use_effect_complete, set__use_effect_complete] = useState(false);
  const [swStatusInfo, set__swStatusInfo] = useState({
    "status": null
  });
  const Loading = () => <div className="flex items-center space-x-2 text-gray-500 py-4">
      <div className="w-4 h-4 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"></div>
      <span className="text-sm font-medium">Checking status...</span>
    </div>;
  useEffect(() => {
    const fetchData = async () => {
      try {
        await fetch__swStatus();
      } catch (error) {
        console.error("An error occurred in the StopWatchApiStatus useEffect process:", error);
      } finally {
        set__use_effect_complete(true);
      }
    };
    fetchData();
  }, []);
  async function fetch__swStatus() {
    let url = `https://api.threadi.au/health`;
    try {
      const controller = new AbortController();
      const timeoutId = setTimeout(() => controller.abort(), 10_000);
      const response = await fetch(url, {
        signal: controller.signal
      });
      clearTimeout(timeoutId);
      if (response.status == 200) {
        const data = await response.json();
        set__swStatusInfo(data);
      } else {
        const data = await response.clone().json().catch(() => response.text());
        console.error("Error retrieving StopWatch API Status", response.status, data);
        throw new Error(`Server responded with status ${response.status}`);
      }
    } catch (err) {
      console.error('An error occurred during the fetch StopWatch API Status process', err);
      throw err;
    }
  }
  return use_effect_complete ? <>
      {["ok"].includes(swStatusInfo?.status) ? <Check>
          <strong>Operational</strong>: StopWatch API appears to be functioning normally.
        </Check> : <Warning>
          <strong>Potential Issue</strong>: StopWatch API may not be functioning normally. Wait a few moments before refreshing this page. If this issue persists, please submit a <a href="https://www.threadi.au/support?app_name=stopwatch" target="_blank" rel="noreferrer">support request</a>.
        </Warning>}
    </> : <Loading />;
};

export const HubspotStatus = () => {
  const [use_effect_complete, set__use_effect_complete] = useState(false);
  const [hsStatusInfo, set__hsStatusInfo] = useState({
    "page": {
      "id": null,
      "name": null,
      "url": null,
      "updated_at": null
    },
    "status": {
      "description": "Unknown",
      "indicator": "unknown"
    }
  });
  useEffect(() => {
    const fetchData = async () => {
      try {
        await fetch__hsStatus();
      } catch (error) {
        console.error("An error occurred in the HubspotStatus useEffect process:", error);
      } finally {
        set__use_effect_complete(true);
      }
    };
    fetchData();
  }, []);
  async function fetch__hsStatus() {
    let url = `https://status.hubspot.com/api/v2/status.json`;
    try {
      const controller = new AbortController();
      const timeoutId = setTimeout(() => controller.abort(), 10_000);
      const response = await fetch(url, {
        signal: controller.signal
      });
      clearTimeout(timeoutId);
      if (response.status == 200) {
        const data = await response.json();
        set__hsStatusInfo(data);
      } else {
        const data = await response.clone().json().catch(() => response.text());
        console.error("Error retrieving HubSpot Status via API", response.status, data);
        throw new Error(`Server responded with status ${response.status}`);
      }
    } catch (err) {
      console.error('An error occurred during the fetch HubSpot Status process', err);
      throw err;
    }
  }
  return <>
      {hsStatusInfo.status.indicator === "unknown" ? <Info>
          <strong>{hsStatusInfo.status.description}</strong>: There's been an issue retrieving HubSpot
          Status information. Please refer directly to HubSpot's status page for updates.
        </Info> : hsStatusInfo.status.indicator === "none" ? <Check>
          <strong>{hsStatusInfo.status.description}</strong>: HubSpot currently has no acknowledged issues.
        </Check> : hsStatusInfo.status.indicator === "minor" ? <Warning>
          <strong>{hsStatusInfo.status.description}</strong>: HubSpot has acknowledged minor issues. It's possible this could be impacting our apps.
        </Warning> : hsStatusInfo.status.indicator === "major" ? <Warning>
          <strong>{hsStatusInfo.status.description}</strong>: HubSpot has acknowledged major issues. This could be impacting our apps.
        </Warning> : hsStatusInfo.status.indicator === "critical" ? <Danger>
          <strong>{hsStatusInfo.status.description}</strong>: HubSpot has acknowledged critical issues. This is likely impacting our apps.
        </Danger> : <Info>
          <strong>{hsStatusInfo.status.description}</strong>: We're not sure how to interpret HubSpot's current status.
          Please refer directly to HubSpot's status page for updates.
        </Info>}

      <p>
        <strong>Last updated: </strong>
        {hsStatusInfo.page.updated_at ? new Date(hsStatusInfo.page.updated_at).toLocaleString() : "Unknown"}
      </p>

      <p>
        Please refer to{" "}
        <a href={hsStatusInfo.page.url ?? "https://status.hubspot.com/"} target="_blank" rel="noreferrer">HubSpot's status page</a> for additional information.
      </p>
    </>;
};

### Thread Integrations Status

**There are currently no acknowledged issues affecting our apps**
<br />Please keep in mind that we rely heavily on HubSpot APIs to deliver our apps. As such, it's possible that an issue acknowledged by HubSpot could be having downstream impacts (see [**HubSpot Status**](#hubspot-status) section below).

#### StopWatch API

<StopWatchApiStatus />

***

### HubSpot Status

<HubspotStatus />

***

#### <Icon icon="circle-question" /> Need Help?

If you're experiencing an issue with one of our apps, please submit a [support request](https://www.threadi.au/support).
